// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); worksheet.getRange("A1:C2").merge(); worksheet.getRange("A1:C2").getInterior().setColor(Color.GetGreen()); // Save to a pdf file workbook.save("SaveRangeFillToPDF.pdf");