Read & Write
Access cell values, formulas, and ranges with full formatting support
Tables & Charts
Create and manipulate Excel tables, charts, and pivot tables
Functions
Execute Excel functions and recalculate workbooks
Prerequisites
- An Azure AD Application registered in your tenant
- Application permissions granted:
Files.Read.All- Read-only access to filesFiles.ReadWrite.All- Read/write access to filesSites.Read.AllorSites.ReadWrite.All- For SharePoint-based files
- Admin consent granted for these permissions
- Usage as App
- Usage as MCP
Installation
- Go to Apps in your workspace
- Search for Excel and install it
- Configure the app instance with your Azure AD credentials
Configuration
| Field | Value |
|---|---|
| Azure Client ID | Application (client) ID from Azure AD |
| Azure Client Secret | Client secret value |
| Azure Tenant ID | Directory (tenant) ID |
| SharePoint Site ID | Optional, for SharePoint-hosted files |
File Access
OneDrive files - provide onlyitemId:itemId and siteId:Available Automations
Workbook Operations
| Automation | Description |
|---|---|
createWorkbook | Create a new Excel workbook |
calculateWorkbook | Recalculate all formulas |
Worksheet Operations
| Automation | Description |
|---|---|
listWorksheets | List all worksheets |
getWorksheet | Get worksheet details |
addWorksheet | Create new worksheet |
updateWorksheet | Rename or reposition |
deleteWorksheet | Delete worksheet |
getUsedRange | Get data-containing range |
Range Operations
| Automation | Description |
|---|---|
getRange | Read cell values and formulas |
updateRange | Write values to cells |
getCell | Read a single cell |
clearRange | Clear contents or formatting |
insertRange | Insert cells with shift |
deleteRange | Delete cells with shift |
sortRange | Sort range data |
mergeRange | Merge cells |
unmergeRange | Unmerge cells |
Formatting
| Automation | Description |
|---|---|
updateFormat | Set alignment and wrapping |
updateFont | Set font properties |
updateFill | Set background color |
updateBorder | Set border styles |
autofitColumns | Auto-fit column widths |
autofitRows | Auto-fit row heights |
Tables
| Automation | Description |
|---|---|
listTables | List tables in workbook |
getTable | Get table details |
createTable | Create table from range |
updateTable | Update table properties |
deleteTable | Delete table |
addTableRow | Add row to table |
updateTableRow | Update row values |
deleteTableRow | Delete row |
addTableColumn | Add column |
deleteTableColumn | Delete column |
applyTableSort | Sort table |
applyTableFilter | Filter table |
clearTableFilter | Clear filters |
convertTableToRange | Convert to normal range |
Charts
| Automation | Description |
|---|---|
listCharts | List charts in worksheet |
getChart | Get chart details |
addChart | Create chart |
updateChart | Update properties |
deleteChart | Delete chart |
setChartData | Change data source |
setChartPosition | Position chart |
getChartImage | Export as image |
updateChartTitle | Set title |
updateChartLegend | Configure legend |
Named Items & Pivot Tables
| Automation | Description |
|---|---|
listNamedItems | List named ranges |
getNamedItem | Get named item value |
addNamedItem | Create named range |
updateNamedItem | Update named item |
listPivotTables | List pivot tables |
getPivotTable | Get pivot table details |
refreshPivotTable | Refresh pivot table |
refreshAllPivotTables | Refresh all |
Functions
| Automation | Description |
|---|---|
executeExcelFunction | Execute Excel function |
DSUL Examples
Read a Range
Write Values
Create a Table
Error Handling
| HTTP Status | Error | Solution |
|---|---|---|
| 401 | Unauthorized | Reconfigure credentials |
| 403 | Forbidden | Check app permissions |
| 404 | Not Found | Verify item ID exists |
| 423 | Locked | Close file in Office app |
| 429 | Rate Limited | Wait and retry |
Common Issues
“File is locked” - The Excel file is open in the desktop application. Close it or wait for auto-save. “Invalid range address” - Use A1 notation (e.g., “A1:C10”, not row/column numbers). “Range too large” - Excel API limits requests to 5 million cells. Split into smaller ranges. “.xls not supported” - Only .xlsx files are supported. Convert legacy files first.Rate Limits
| Limit | Value |
|---|---|
| Per-app (all tenants) | 5,000 requests/10 seconds |
| Per-app per-tenant | 1,500 requests/10 seconds |
| Max cells per request | 5,000,000 |
| Max file size | 25 MB |
Retry-After header.
External Resources
Microsoft Graph Excel API
Official API documentation
Excel API Best Practices
Performance optimization tips
Graph Explorer
Test API calls interactively
MCP Specification
Model Context Protocol specification