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

Free Support Forum - aspose.com

Excelsheet render to PDF with 20973 pages

I have an Excelsheet with 3 tab’s which renders to 20973 pages.
Excelsheet and PDF.zip (440.5 KB)

            var workbook = new Aspose.Cells.Workbook(cXlsFile);
            workbook.Save(cPdfFile, Aspose.Cells.SaveFormat.Pdf);

@nederpelt,

The output PDF file generated by Aspose.Cells is correct. If you could open your Excel file into MS Excel manually and take the print preview of the third sheet, you will notice MS Excel will render 20971 pages. So, total pages are 20973 (fist sheet =1, second sheet = 1 and third sheet = 20971). I also found mostly the pages in third sheet are blank (please confirm in Print Preview in MS Excel), so maybe you can try the following lines of code before rendering to PDF, so blank pages should not be rendered:
e.g
Sample code:

//Remove blank rows and columns in the third sheet.
workbook.Worksheets[2].Cells.DeleteBlankRows();
workbook.Worksheets[2].Cells.DeleteBlankColumns();