I’m not getting the correct page #'s when counting pages for Excel spreadsheets. I want the number of pages that would print. This is the code that I’m using:
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(doc2CountStream);
Worksheet worksheet = workbook.Worksheets;
Aspose.Cells.Rendering.ImageOrPrintOptions printoption = new Aspose.Cells.Rendering.ImageOrPrintOptions();
printoption.PrintingPage = PrintingPageType.Default;
Aspose.Cells.Rendering.SheetRender sheetRender = new Aspose.Cells.Rendering.SheetRender(worksheet, printoption);
pageCount = sheetRender.PageCount;
For the attached file the page count comes out to 2, but when I default print it only prints one page. Thanks for your help!