Documentation Index Fetch the complete documentation index at: https://prismeai-legacy.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The Excel connector provides full access to Microsoft Excel workbooks via the Microsoft Graph API, enabling AI agents and automations to read, write, and manipulate spreadsheets stored in OneDrive or SharePoint.
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 files
Files.ReadWrite.All - Read/write access to files
Sites.Read.All or Sites.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 only itemId:- Excel.getRange :
itemId : "01ABCDEF..."
worksheetId : Sheet1
address : "A1:C10"
output : data
SharePoint files - provide itemId and siteId:- Excel.getRange :
itemId : "01ABCDEF..."
siteId : "contoso.sharepoint.com,abc-123,def-456"
worksheetId : Sheet1
address : "A1:C10"
output : data
Available Automations Workbook Operations Automation Description createWorkbookCreate a new Excel workbook calculateWorkbookRecalculate all formulas
Worksheet Operations Automation Description listWorksheetsList all worksheets getWorksheetGet worksheet details addWorksheetCreate new worksheet updateWorksheetRename or reposition deleteWorksheetDelete worksheet getUsedRangeGet data-containing range
Range Operations Automation Description getRangeRead cell values and formulas updateRangeWrite values to cells getCellRead a single cell clearRangeClear contents or formatting insertRangeInsert cells with shift deleteRangeDelete cells with shift sortRangeSort range data mergeRangeMerge cells unmergeRangeUnmerge cells
Automation Description updateFormatSet alignment and wrapping updateFontSet font properties updateFillSet background color updateBorderSet border styles autofitColumnsAuto-fit column widths autofitRowsAuto-fit row heights
Tables Automation Description listTablesList tables in workbook getTableGet table details createTableCreate table from range updateTableUpdate table properties deleteTableDelete table addTableRowAdd row to table updateTableRowUpdate row values deleteTableRowDelete row addTableColumnAdd column deleteTableColumnDelete column applyTableSortSort table applyTableFilterFilter table clearTableFilterClear filters convertTableToRangeConvert to normal range
Charts Automation Description listChartsList charts in worksheet getChartGet chart details addChartCreate chart updateChartUpdate properties deleteChartDelete chart setChartDataChange data source setChartPositionPosition chart getChartImageExport as image updateChartTitleSet title updateChartLegendConfigure legend
Named Items & Pivot Tables Automation Description listNamedItemsList named ranges getNamedItemGet named item value addNamedItemCreate named range updateNamedItemUpdate named item listPivotTablesList pivot tables getPivotTableGet pivot table details refreshPivotTableRefresh pivot table refreshAllPivotTablesRefresh all
Functions Automation Description executeExcelFunctionExecute Excel function
DSUL Examples Read a Range - Excel.getRange :
itemId : "01ABCDEF..."
worksheetId : Sheet1
address : "A1:C10"
output : data
Write Values - Excel.updateRange :
itemId : "01ABCDEF..."
worksheetId : Sheet1
address : "A1:C2"
values :
- [ "Name" , "Age" , "City" ]
- [ "John" , 30 , "New York" ]
output : result
Create a Table - Excel.createTable :
itemId : "01ABCDEF..."
worksheetId : Sheet1
address : "A1:C10"
hasHeaders : true
output : table
MCP Setup
Open your AI Knowledge project
Go to Advanced > Tools
Click Add and select the MCP tab
Enter the MCP endpoint URL
In the Headers field, add your credentials:
{
"mcp-api-key" : "your-mcp-api-key" ,
"azure-client-id" : "your-client-id" ,
"azure-client-secret" : "your-client-secret" ,
"azure-tenant" : "your-tenant-id" ,
"azure-site-id" : "your-sharepoint-site-id"
}
Authentication Configure workspace secrets for Azure AD Client Credentials Flow: Secret Description azureClientIdAzure AD client ID azureClientSecretAzure AD client secret azureTenantAzure AD tenant ID azureSiteIdOptional SharePoint site ID
File Access OneDrive files - provide only itemId:{ "itemId" : "01ABCDEF..." }
SharePoint files - provide itemId and siteId:{
"itemId" : "01ABCDEF..." ,
"siteId" : "contoso.sharepoint.com,abc-123,def-456"
}
SharePoint with specific drive - add driveId:{
"itemId" : "01ABCDEF..." ,
"siteId" : "contoso.sharepoint.com,abc-123,def-456" ,
"driveId" : "b!xyz..."
}
All 50+ automations listed in the App tab are available as MCP tools with the same names and parameters.
Workbook : createWorkbook, calculateWorkbook
Worksheets : listWorksheets, getWorksheet, addWorksheet, updateWorksheet, deleteWorksheet, getUsedRange
Ranges : getRange, updateRange, getCell, clearRange, insertRange, deleteRange, sortRange, mergeRange, unmergeRange
Formatting : updateFormat, updateFont, updateFill, updateBorder, autofitColumns, autofitRows
Tables : listTables, getTable, createTable, updateTable, deleteTable, addTableRow, updateTableRow, deleteTableRow, addTableColumn, deleteTableColumn, applyTableSort, applyTableFilter, clearTableFilter, convertTableToRange
Charts : listCharts, getChart, addChart, updateChart, deleteChart, setChartData, setChartPosition, getChartImage, updateChartTitle, updateChartLegend
Named Items : listNamedItems, getNamedItem, addNamedItem, updateNamedItem
Pivot Tables : listPivotTables, getPivotTable, refreshPivotTable, refreshAllPivotTables
Functions : executeExcelFunction
JSON-RPC Examples Read a Range {
"name" : "getRange" ,
"arguments" : {
"itemId" : "01ABCDEF..." ,
"worksheetId" : "Sheet1" ,
"address" : "A1:C10"
}
}
Write Values {
"name" : "updateRange" ,
"arguments" : {
"itemId" : "01ABCDEF..." ,
"worksheetId" : "Sheet1" ,
"address" : "A1:C2" ,
"values" : [
[ "Name" , "Age" , "City" ],
[ "John" , 30 , "New York" ]
]
}
}
All tools support an outputFormat parameter:
verbose (default) - Human-readable text for LLM consumption
structured - Machine-readable JSON in structuredContent
both - Both text and structured content
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
When rate limited, the API returns HTTP 429 with a 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