[]
        
(Showing Draft Content)

导出填充样式

GcExcel允许用户导出工作表中保存的单元格填充样式。

要将包含填充样式的excel文件导出为PDF格式,请参阅以下示例代码。

// Create a new workbook and access the default worksheet
Workbook workbook = new Workbook();
IWorksheet worksheet = workbook.getWorksheets().get(0);
        
// Merge cells and apply fill style
worksheet.getRange("A1:C2").merge();
worksheet.getRange("A1:C2").getInterior().setColor(Color.GetGreen());

// Save to a pdf file
workbook.save("ExportFills.pdf", SaveFileFormat.Pdf);