microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Workbook.Worksheets[].Range.GetAsync() fails with cell count error after ~28th April 2026
@lramosvea is already working on this.
Since May 11, 2026.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Bug Report: Workbook.Worksheets[].Range.GetAsync() fails with cell count error after ~28th April 2026
Description
Code that has worked reliably for an extended period began failing on or around 28th April 2026 with the following error:
365 interaction error: The cell count in the range has exceeded the maximum supported number. Please refer to the documentation: https://docs.microsoft.com/office/dev/add-ins/concepts/resource-limits-and-performance-optimization#excel-add-ins
SDK Version
Microsoft.Graph 5.86.0 (released July 2025 - no SDK update occurred around the failure date)
Code that stopped working
WorkbookRange wbkrange = await graphClient.Drives[driveId]
.Items[itemId]
.Workbook.Worksheets[worksheetId]
.Range
.GetAsync();
Investigation
- No changes were made to the codebase or NuGet packages around this date
- Restoring the workbook to a 27th April version via SharePoint version history did not resolve the issue, ruling out data growth as the cause
- The worksheet used range was verified to be well within documented limits (~87,000 cells after cleanup of phantom data)
- No relevant changes were found in the Microsoft Graph changelog for this period
Workaround
Replacing .Range.GetAsync() with .UsedRange.GetAsync() resolves the issue:
WorkbookRange wbkrange = await graphClient.Drives[driveId]
.Items[itemId]
.Workbook.Worksheets[worksheetId]
.UsedRange
.GetAsync();
Questions
- Was there an undocumented server-side change to how
.Rangecalculates cell count around 28th April 2026? - Is
.UsedRangenow the recommended approach for retrieving worksheet data via the Graph API? - If this was an intentional change, could it please be documented in the changelog to help other developers diagnose similar issues?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.