Issue about page count of spreadsheet file

Hi,
In a application, I need to know page count of a Excel file through SDK/C++.
It works for some file for failed for other files. I upload a sample file
named 3pages-libre.xlsx
<http://nabble.documentfoundation.org/file/n4187912/3pages-libre.xlsx>

Here is my code snippet:
Reference< XMasterPagesSupplier> xMasterPagesSupplier(myDocument,
UNO_QUERY);
Reference< XDrawPages > xDrawPages = xDrawPageSupplier->getDrawPages();
Reference< XIndexAccess > xIndex( xDrawPages, UNO_QUERY);
int pageCount = xIndex->getCount();

Thanks for any help!

Shawn

By the way, the spreadsheet has 3 pages but getCount() return 1.

I also try to get page count through
XDocumentProperties->getDocumentStatistics(), but the attached file return 0
NamedValue. So I am wondering whether LibreOffice SDK support calculate page
count for Excel format?

hi. your welcome.
its my pleasure to help you.
try my way and i hope that you get the desire result in excel like
word documents.