Hello! I have a workbook with some data in one of the worksheets. From this worksheet I have some code that dynamically computes the coordinates of a range. This range must be exported as a single image or multiple images based on the page breaks in the worksheet.
I found out that if I set PrintArea, SheetRender will completely ignore page breaks that apply to that range and the PageCount is always 1. So it always exports 1 image, no matter what page breaks I define in the workbook.
Another problem is that the image exported is too wide and tall. I need it to fit to the exported range. It has too much blank space to the right and bottom of the data area.
I attach a demo project.
Thank you!
Hi,
Thanks for the sample project.
After an initial test, I can find the issue as you have mentioned by running your project with our latest fixed version v7.0.4.2. I have logged a ticket with an id: CELLSNET-40227. We will look into it soon.
Thank you.
Hi,
Please download: Aspose.Cells for .NET v7.0.4.4
Following line in your demo project must be commented, because OnePagePerSheet = true means total sheet will be be output as one image.
//OnePagePerSheet = true,
“Another problem is that the image exported is too wide and tall. I need it to fit to the exported range. It has too much blank space to the right and bottom of the data area.”
We does the same as Excel print preview.