We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Excel to image of specific size

Hi, I want to convert excel file to image of specific size. can you please let me know how can i achive this.


Thanks for your posting and using Aspose.Cells for .NET.

Please refer to the following documentation article that explains how to convert your worksheet into image.


I am looking ans for Java and link provided by you is not working.


Thanks for your posting and using Aspose.Cells.

Please try the following java link and see if it works for you.


I refer this code but the probelm is this my page is too wide and for this it will create 3 image filea and i want only one page per worksheet.

PageSetup pageSetup = worksheet.getPageSetup();

ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();

Worksheet sheet = workbook.getWorksheets().get(0);
SheetRender sr = new SheetRender(sheet, imgOptions);

for (int j = 0; j < sr.getPageCount(); j++) {
sr.toImage(j, );

By this way I get 1 image per workbook but output iamge is of A4 size and of very low quality (on zoom nothing is clear). i want image to be clear and of customised size like 12*14. Is it possible?


Thanks for your posting and using Aspose.Cells for Java.

Please use the following code to convert your entire worksheet contents in a single page.


Workbook workbook = new Workbook(path);

Worksheet worksheet = workbook.getWorksheets().get(1);

ImageOrPrintOptions options = new ImageOrPrintOptions();



SheetRender sr = new SheetRender(worksheet, options);

sr.toImage(0, new FileOutputStream(path + “.out.png”));

Thanks for your response will work for me :slight_smile: