Microsoft Excel
Microsoft Excel integration for reading and writing cells, ranges, worksheets, and tables in cloud workbooks via Microsoft Graph
The Microsoft Excel integration lets your agents read and write data in Excel workbooks stored in OneDrive or SharePoint, through the Microsoft Graph workbook API — cells, ranges, worksheets, and tables. It operates on cloud workbooks (Excel for the web / Microsoft 365), not local .xlsx files.
Prerequisites
- A Microsoft 365 account with the workbook stored in OneDrive or SharePoint.
- The workbook's location — agents address a workbook by its
drive_id+item_id, which you get from the OneDrive or SharePoint file tools (e.g.onedrive.get_itemorsharepoint.list_drive_items). - Permission to authorize third-party apps in your tenant. Some organizations require admin consent for the
Files.*.Allscopes.
Setup
-
Open Integrations from the sidebar
-
Select Microsoft Excel from the catalog
-
Click Add Integration Config
-
Give the config a display name (e.g., "Excel — Finance").
-
Click Connect and complete the Microsoft sign-in.
-
In the OAuth scope picker, choose which Graph permissions to grant:
Scope Required for Recommended Read your files ( Files.Read)Reading workbooks in your own OneDrive Yes Edit your files ( Files.ReadWrite)Writing cells, adding rows/worksheets If the agent writes Read all shared files ( Files.Read.All)Reading workbooks in SharePoint / shared with you If workbooks live in SharePoint Edit all shared files ( Files.ReadWrite.All)Writing to SharePoint / shared workbooks If writing SharePoint workbooks Stay connected ( offline_access)Background refresh so users aren't reprompted Yes Read-only tools accept either the read or the read/write scope — grant the narrower one when the agent never writes.
-
Save the config
Connection testing is available — click Test on the saved config to verify the credentials against Microsoft Graph before deploying.
Using in Your Agent
- In an Agent Step, attach your Excel config and its tools
- First resolve the workbook: use an OneDrive/SharePoint tool to get the workbook's
drive_idanditem_id - Then call Excel tools referenced as
excel.get_used_range,excel.update_range, etc.
To read a whole sheet without knowing its size, use Get Used Range. To write, pass values as a 2D JSON array matching the target range — e.g. [["Name","Age"],["Alice",30]]. Formula strings like "=SUM(A1:A9)" are supported.
Available Tools
Worksheets
| Tool | Description | Action Type |
|---|---|---|
list_worksheets | List the worksheets (tabs) in a workbook | ReadOnly |
add_worksheet | Add a new worksheet | Reversible |
Ranges
| Tool | Description | Action Type |
|---|---|---|
get_used_range | Read the whole used range of a worksheet | ReadOnly |
get_range | Read a specific A1-style range | ReadOnly |
update_range | Write values into a range | Reversible |
Tables
| Tool | Description | Action Type |
|---|---|---|
list_tables | List tables in a workbook | ReadOnly |
get_table_rows | Read a table's data rows | ReadOnly |
add_table_row | Append rows to a table | Reversible |