Hi Tauqeer,
Thank you for sharing the sample spreadsheet.
We have evaluated the presented scenario while using the latest revision of Aspose.Cells for Java 8.7.0.2, and we are able to notice the said issue, that is; the page count returned by Aspose.Cells APIs do not match with the Excel’s Print Preview count. We have logged an investigative ticket with Id CELLSJAVA-41729. Please spare us little time to thoroughly analyze the case and revert back with updates in this regard.
Hi
when can we expect fix available?
Hi Tauqeer,
I am afraid, the ticket logged earlier as CELLSJAVA-41729 is currently unresolved. I have requested the concerned member of the product team to share insight of the mentioned problem, and if possible, a rough estimate for the fix. As soon as we get any news in this regard, we will share it here for your reference.
Thank you for your patience with us.
Hi,
Thanks for using Aspose.Cells.
The paper type is not set. We use the default paper A4 but MS Excel uses paper Letter. It will be OK by setting the paper type to paper Letter:
Please see the following code.
Java
outputWorkSheet.copy(worksheet);
outputWorkSheet.getPageSetup().setPaperSize(PaperSizeType.PAPER_LETTER);