Hi,
I am using Aspose.cells v8.5.2
Using the following code I am converting the first sheet to image that takes too long, on an average 6-7s
private static void tableToImage() throws Exception {
Workbook workbook = new Workbook(“D:\temp\Book1.xlsx”);
workbook.save(“D:\temp\Book1.xlsx”, SaveFormat.XLSX);
com.aspose.cells.Worksheet sheet = workbook.getWorksheets().get(0);
sheet.getPageSetup().setTopMargin(0);
sheet.getPageSetup().setBottomMargin(0);
sheet.getPageSetup().setRightMargin(0);
sheet.getPageSetup().setLeftMargin(0);
ImageOrPrintOptions imageOrPrintOptions = new ImageOrPrintOptions();
imageOrPrintOptions.setHorizontalResolution(600);
imageOrPrintOptions.setVerticalResolution(600);
imageOrPrintOptions.setOnePagePerSheet(true);
imageOrPrintOptions.setOnlyArea(true);
imageOrPrintOptions.setImageFormat(ImageFormat.getPng());
SheetRender sr = new SheetRender(sheet, imageOrPrintOptions);
long st = System.currentTimeMillis();
sr.toImage(0, “D:\temp\out.png”);
long tt = System.currentTimeMillis()-st;
System.out.println(tt +“ms”);
}
Can you please look into this performance issue.
Thanks,
Jaspreet.