Free Support Forum - aspose.com

Wrong Conversion of Excel to PDF

Dear Team,


I am facing an issue in the conversion of an excel to PDF.

From the attached files, the Excel when converted ideally should be converted to 3 pages but the in the output file its getting converted to 5 pages with 2 blank pages.

Please help in resolving this issue.

Thanks and regards,
Bimal.

Hi,


Thanks for the template files.

I noticed this issue for the sheet “装配芯片” as you described, it renders 4 pages instead of 2. You may workaround the situation by removing blank rows and columns explicitly in the code, see the sample lines of code that you may before rendering to PDF file format by Aspose.Cells APIs.
e.g
Sample code:

workbook.Worksheets[“装配芯片”].Cells.DeleteBlankRows();
workbook.Worksheets[“装配芯片”].Cells.DeleteBlankColumns();

Hope, this helps a bit.

Thank you.