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

Free Support Forum - aspose.com

Issue when printing an area in a sheet


I have another issue when printing an area in a sheet. Here are steps:

Print area A1: P100
Real with image size width/height: 1831 X 1937

The excel width/height (calculated by sum of all cells in 1st row and 1st column): 1703 X 2000

Can you let me know whether any solution to make these things consistent?
They are not consistent even in the ratio ?


Your query is more related to Aspose.Cells API. We are moving your query in Aspose.Cells forum where you will be guided appropriately.


While rendering to PrintView, Microsoft Excel also scale in horizontal, vertical direction. Please try to set ImageOrPrintOptions.OnlyArea to true for getting image dimension you are seeing in Microsoft Excel normal view.

Let us know your feedback.

You guys made my day.
It works.

Thank you so much


You are welcome.

Hi @ahsaniqbalsidiqui

Actually the Aspose.Cells works well with my console application. It can render and save image.
However, it took us ~ 427s to save the image from our ASP.NET WebAPI application with the error:
System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+

Our code is very simple
string outputImage = Guid.NewGuid().ToString();
// Take the image of your worksheet
SheetRender sr = new SheetRender(worksheet, options);
sr.ToImage(0, Path.Combine(“C:\tmp”, $"{outputImage}.png" );


Could you please share the narrowed down application for our testing. We will reproduce the problem and provide our feedback after analysis.

Sorry, it’s our fault to ask for the wrong area “A0:A10:smirk:

Now is another problem: We discover a memory leak when trying to use ASPOSE Cells
Just a simple code to open the Workbook (We believe we already put them in using)
Screen Shot 2018-11-01 at 3.32.47 PM.png (23.7 KB)

After the API call, the memory is still 500MB, we don’t see the memory is released.

The question is: we can’t release this to production if many user request multiple requests.


Could you please share your template file and code snippet for our testing. We will reproduce the problem and provide our feedback after analysis.

hi @ahsaniqbalsidiqui

THe code is simple exactly in my screen shot (attached).


It is requested that please send us the template Excel file which is being opened in this test code. You may ZIP the excel file and upload here or provide link to some online file sharing server like Dropbox or Google Drive. Also send us a console application(runnable) which can be executed here without any missing reference. We will reproduce the problem and provide our feedback after analysis.