Empty output when converting Excel file to image using Aspose.Cells in .NET

source.zip (8.0 KB)
Hey, I am trying to convert an Excel document to a png image. But when I convert it to an image, using the SheetRender class, after passing in the worksheet and ImageOrPrintOption object as parameters, the SheetRender instance I created has 0 for its PageCount property. But In the file I provided, there is just one object(shape) a VBA object. Pls, can you figure out what’s wrong. Thank you.

@Trickstar,

Thanks for your query.

I have tried this scenario by rendering workbook to PDF and other formats using Excel 365 but could not observe issue as Excel also creates empty output. It seems to be the expected behavior. You may please test this scenario using Excel, and if it works as per your expectation, please share the steps to produce the output using Excel. We will provide assistance to produce similar output using Aspose.Cells.

Thanks for your reply.

I used Aspose.Cells to convert the Excel Document to an image and there was no output,I tried using Excel to convert it but they don’t provide any option to convert to an Image.

@Trickstar,

You may try conversion to PDF using Excel as it also renders sheet. This may clarify you the behavior that even Excel does not render anything. Otherwise please google term “convert excel file to image” and try methods to convert sheet to image using Excel.

As per our initial investigation, it does not seem to be an issue with Aspose.Cells as Excel also creates empty outputs while rendering sheet to different file formats like PDF, XPS using “Microsoft XPS Document Writer” etc.