File limits in PDF generation using Microsoft Graph API

Peter Black 1 Reputation point
2021-03-19T20:23:19.687+00:00

We are converting an Excel file to PDF by uploading to SharePoint using the Graph API, then downloading using format=pdf. This has been working fine for most files, but fails for a spreadsheet with 2007 rows (317kb in size). When converted manually in Excel 365 the file produces a PDF of 462 pages. Clearly we can alter the settings we pass to reduce the number of pages, but it would be helpful to understand what the service API limits are (given it does actually work in Excel 365).

The API request we're using is:

theInputStream = theGraphClient.sites(aSiteId).drives(myDrive.id) .items(theUploadedItem.id).content().buildRequest(requestOptions).get();

The error log contains the error XLSPageLimitExceeded. Can anyone explain what the value of the limit is? Also, Is there a limitation for the generation for:

  1. File size
  2. Number of rows
  3. Number of columns
  4. Number of cells
  5. Number of sheets

Or anything else? Thanks so much!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,239 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deva-MSFT 2,266 Reputation points Microsoft Employee
    2021-03-20T15:52:31.08+00:00

    Adding a similar thread which i answered it earlier!!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.