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

Free Support Forum - aspose.com

How to get Page count of a work sheet programmatically

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, 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.


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.


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.