question

AllenConquest-0663 avatar image
0 Votes"
AllenConquest-0663 asked saldana-msft edited

Converting Excel file to PDF using MS Graph API and SharePoint

I am programmatically converting Excel files to PDF, but uploading them to SharePoint, and then downloading in a PDF format. This has been working fine, but I now have an issue trying to convert a large Excel file. It has about 2007 rows, and when converted using Excel 365 creates a 462 page PDF.

When I try to convert this file programmatically, I get this error: XLSPageLimitExceeded

I presume this means I'm exceeding some limit to the number of pages. But I am unable to find this limit documented anywhere.

Could you please point me to where this limit (and any others are documented), or let me know what this limit is, and others, such as file size.

Thank you,

Allen

microsoft-graph-sites-listsmicrosoft-graph-workbooks
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Deva-MSFT avatar image
0 Votes"
Deva-MSFT answered AllenConquest-0663 commented
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

These are interesting limits, but don't seem to relate directly to what I am experiencing. If I take the spreadsheet and convert it to a PDF using Excel 365 on my local machine, everything works fine. It produces a PDF with 462 pages.

However, if I upload that file to SharePoint using the MS Graph API, and then download as a PDF, I get this error message XLSPageLimitExceeded. When I search on google for that error, I find nothing that explains what it is, or what limit is being exceeded. It implies the number of pages in Excel, but how do you even work that out. The spreadsheet has one sheet with 2007 rows and 21 columns. That doesn't sound too big to me.

0 Votes 0 ·
GorkaG-1081 avatar image
0 Votes"
GorkaG-1081 answered

Hi @Deva-MSFT ,
We have the same problem, many excel files give that error when converting to PDF. (XLSPageLimitExceeded)
The specifications and limits mentioned before, are only for the normal use of excel in sharepoint, and excel online, but are not related with the conversion to PDF with MS Graph.
There is any guide or specifications with the limits for this type of conversion to PDF?, if we will have that problem is important to know when and why it will happen.
Thanks

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DavidBurg-0118 avatar image
0 Votes"
DavidBurg-0118 answered

The page limit is 250 pages. Beyond this count of pages, you will see XLSPageLimitExceeded error.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.