The Excel connector exposes Microsoft Excel workbooks through the Microsoft Graph API. It can be consumed two ways: as a remote MCP server that Agent Factory agents call as tools, or as a Builder app whose instructions you call directly from DSUL. It runs in the installing workspace’s own app-instance context and resolves its Microsoft credential server-side — either Azure AD client credentials (a service-account app accessing files across the tenant) or delegated OAuth (acting as a signed-in user). Agents read, write, and manipulate cells, ranges, tables, charts, named items, and pivot tables in spreadsheets hosted on OneDrive or SharePoint.
Read & write cells
Read and write cell values, formulas, and ranges with full formatting control, plus insert, clear, sort, and merge operations.
Tables, charts & pivots
Create and manipulate Excel tables, charts, named ranges, and pivot tables — including exporting a chart as an image.
Functions & recalculation
Run Excel worksheet functions and force a full workbook recalculation from an agent or automation.
Who is this for?
This connector is used by three different roles. Jump to the section that matches yours — each one is self-contained.Agent builder
You build agents in Agent Factory and want them to work with Excel workbooks. → Agent builder tab.
Platform admin
You run the platform and want to know what one-time setup Excel needs. → Platform admin setup accordion below.
Workspace builder
You write Builder automations (DSUL) that call Excel instructions directly. → Workspace builder tab.
Prerequisites
- A Microsoft 365 / Azure AD tenant with the workbooks you want to reach stored in OneDrive or SharePoint (
.xlsxfiles only — legacy.xlsis not supported). - An Azure AD application registered in that tenant (Azure portal > App registrations), with a client secret generated for it.
- Microsoft Graph permissions granted to the app, with admin consent:
Files.Read.All— read-only access to files.Files.ReadWrite.All— read/write access to files.Sites.Read.AllorSites.ReadWrite.All— for SharePoint-hosted files.
- For delegated OAuth mode, the same app must have a redirect URI configured and the corresponding delegated permissions consented; for client-credentials mode, the matching application permissions are used.
- Note the Application (client) ID, the client secret value, and the Directory (tenant) ID — these are pasted into the app configuration. For SharePoint files, also note the site ID.
Platform admin (Governance) — one-time platform setup
Platform admin (Governance) — one-time platform setup
No platform-level credential. Excel follows the static-credential model: each workspace pastes its own Azure AD credentials into the app configuration, and the connector resolves them server-side. There is nothing to register centrally — no shared key, no Governance OAuth auth-config JSON.
Point it at the MCP endpoint
Set the capability’s MCP server URL to the connector’s MCP Endpoint (from the Excel app instance in the providing workspace), and set its Scope to:The
agent_id in the scope is what lets the connector identify the calling agent.- Agent builder (Agent Factory)
- Workspace builder (DSUL)
Agent builder
Goal: let an agent you build in Agent Factory read and write Excel workbooks through Excel MCP tools.Before an agent can call the connector, a Workspace builder must have installed and configured the Excel app with Azure AD credentials (see the Workspace builder tab). A Platform admin may also have published an Excel capability in the catalog (see the Platform admin setup accordion above).
agent_id that Agent Factory injects through the capability Scope.Get the MCP endpoint
From the workspace that runs the Excel app, copy the app instance’s MCP Endpoint URL (or use the published Excel capability if a Platform admin declared one).
Add the capability to your agent
In your agent in Agent Factory, add a capability pointing at the MCP Endpoint URL, and set its Scope to:The
agent_id is what lets the connector identify the calling agent.Brief the agent in its system prompt
Wiring the capability is not enough — the agent must know the tools exist and how to address a file. Copy-pasteable starter:Legacy AI Knowledge agents (no native MCP picker): add the connector under Advanced > Tools > MCP and paste the MCP Endpoint URL.
Available Tools
All instructions listed in the Workspace builder tab are exposed as MCP tools with the same names and parameters. They are grouped below.Workbook
| Tool | Description |
|---|---|
createWorkbook | Create a new Excel workbook. |
calculateWorkbook | Recalculate all formulas in the workbook. |
Worksheets
| Tool | Description |
|---|---|
listWorksheets | List all worksheets in the workbook. |
getWorksheet | Get worksheet details. |
addWorksheet | Create a new worksheet. |
updateWorksheet | Rename or reposition a worksheet. |
deleteWorksheet | Delete a worksheet. |
getUsedRange | Get the data-containing range of a worksheet. |
Ranges
| Tool | Description |
|---|---|
getRange | Read cell values, formulas, and formatting from a range. |
updateRange | Write values to cells in a range. |
getCell | Read a single cell by row/column. |
clearRange | Clear contents and/or formatting of a range. |
insertRange | Insert cells with a shift direction. |
deleteRange | Delete cells with a shift direction. |
sortRange | Sort range data. |
mergeRange | Merge cells in a range. |
unmergeRange | Unmerge cells in a range. |
Formatting
| Tool | Description |
|---|---|
updateFormat | Set alignment and text wrapping. |
updateFont | Set font properties. |
updateFill | Set background color. |
updateBorder | Set border styles. |
autofitColumns | Auto-fit column widths. |
autofitRows | Auto-fit row heights. |
Tables
| Tool | Description |
|---|---|
listTables | List tables in the workbook. |
getTable | Get table details. |
createTable | Create a table from a range. |
updateTable | Update table properties. |
deleteTable | Delete a table. |
addTableRow | Add a row to a table. |
updateTableRow | Update row values. |
deleteTableRow | Delete a row. |
addTableColumn | Add a column. |
deleteTableColumn | Delete a column. |
applyTableSort | Sort a table. |
applyTableFilter | Filter a table. |
clearTableFilter | Clear table filters. |
convertTableToRange | Convert a table to a normal range. |
Charts
| Tool | Description |
|---|---|
listCharts | List charts in a worksheet. |
getChart | Get chart details. |
addChart | Create a chart. |
updateChart | Update chart properties. |
deleteChart | Delete a chart. |
setChartData | Change a chart’s data source. |
setChartPosition | Position a chart. |
getChartImage | Export a chart as an image. |
updateChartTitle | Set a chart title. |
updateChartLegend | Configure a chart legend. |
Named Items & Pivot Tables
| Tool | Description |
|---|---|
listNamedItems | List named ranges. |
getNamedItem | Get a named item’s value. |
addNamedItem | Create a named range. |
updateNamedItem | Update a named item. |
listPivotTables | List pivot tables. |
getPivotTable | Get pivot table details. |
refreshPivotTable | Refresh a pivot table. |
refreshAllPivotTables | Refresh all pivot tables. |
Functions
| Tool | Description |
|---|---|
executeExcelFunction | Execute an Excel worksheet function and return its result. |
Output Formats
Tools accept anoutputFormat argument that controls the MCP response shape:verbose(default) — a human-readable text view of the operation, optimized for LLM consumption.structured— machine-readable JSON instructuredContent.both— the structured payload, with its JSON also rendered as text.
Tool Details
getRange
| Parameter | Required | Description |
|---|---|---|
itemId | Yes | Graph drive item id of the workbook. |
worksheetId | Yes | Worksheet name or id. |
address | Yes | Range in A1 notation (e.g. A1:C10). |
siteId | No | SharePoint site id (for SharePoint-hosted files). |
driveId | No | Specific document library / drive id. |
updateRange
| Parameter | Required | Description |
|---|---|---|
itemId | Yes | Graph drive item id of the workbook. |
worksheetId | Yes | Worksheet name or id. |
address | Yes | Target range in A1 notation; must match the values dimensions. |
values | Yes | 2D array of cell values to write. |
siteId / driveId | No | SharePoint targeting. |
createTable
| Parameter | Required | Description |
|---|---|---|
itemId | Yes | Graph drive item id of the workbook. |
worksheetId | Yes | Worksheet name or id. |
address | Yes | Source range for the table in A1 notation. |
hasHeaders | No | Whether the first row contains column headers. |
addChart
| Parameter | Required | Description |
|---|---|---|
itemId | Yes | Graph drive item id of the workbook. |
worksheetId | Yes | Worksheet name or id. |
type | Yes | Chart type (e.g. ColumnClustered, Line, Pie). |
sourceData | Yes | Range that supplies the chart data, in A1 notation. |
seriesBy | No | How series are grouped: Auto, Columns, or Rows. |
executeExcelFunction
| Parameter | Required | Description |
|---|---|---|
itemId | Yes | Graph drive item id of the workbook. |
functionName | Yes | Excel worksheet function name (e.g. VLOOKUP, SUM). |
values | Yes | Ordered argument list passed to the function. |
Error Handling
| HTTP Status | Error | Solution |
|---|---|---|
| 401 | Unauthorized | Azure credentials are missing, invalid, or expired — reconfigure the app and re-check the client secret. |
| 403 | Forbidden | The Azure AD app lacks the required Microsoft Graph permissions, or admin consent was not granted. |
| 404 | Not Found | Verify the itemId (and siteId/driveId for SharePoint) — the workbook, worksheet, or range does not exist. |
| 423 | Locked | The file is open in a desktop Office app; close it or wait for auto-save. |
| 429 | Rate Limited | Microsoft Graph throttled the request — back off and retry, honoring the Retry-After header. |
| 500 / 503 | Service error | Transient Microsoft Graph error — retry shortly. |
Common Issues
“Missing Azure credentials” — The app configuration has noclientId / clientSecret / tenant. Open the Excel app instance and paste your Azure AD application credentials, then re-run.
“OAuth authentication required. Please connect your Microsoft account first” — Authentication Mode is set to oauth but no delegated token exists yet for the user. Complete the Microsoft connect flow before calling Excel tools, or switch the mode to clientCredentials.
“Client credentials auth failed” — Azure AD rejected the client-credentials token request (wrong tenant id, expired or wrong client secret, or the app lacks application permissions). Re-check the credential values and the granted Graph permissions.
“File is locked” — The workbook is open in the desktop Excel application. Close it or wait for auto-save to release the lock.
“Invalid range address” — Use A1 notation (e.g. A1:C10), not numeric row/column indices.
“.xls not supported” — Only .xlsx workbooks are supported by the Graph workbook API. Convert legacy .xls files to .xlsx first.
Microsoft Graph caps workbook requests at roughly 5 million cells per call and a 25 MB file size; split very large ranges into smaller calls to avoid
429/oversize errors.External Resources
Microsoft Graph Excel API
Official reference for the Microsoft Graph workbook (Excel) API.
Excel API best practices
Performance and session guidance for the Graph workbook API.
Graph Explorer
Test Microsoft Graph calls interactively against your tenant.
Tool Agents
Learn how Agent Factory agents consume MCP tools in Prisme.ai.