> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Microsoft Excel

**Authentication:** OAuth or access token. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* Read the `Pipeline` worksheet from a shared workbook and total deal value by stage.
* Append this week's signups to the `Growth Metrics` workbook in SharePoint.
* Update the forecast tab with the latest actuals and recalculate variance.

## Available Tools

#### list\_charts

List charts in a worksheet

#### add\_chart

Add a chart to a worksheet from a data range

#### get\_chart\_image

Get a base64-encoded PNG image of a chart

#### list\_named\_items

List named items (named ranges and constants) defined in a workbook

#### get\_named\_item

Get a single named item by name

#### get\_range

Get a cell range's values, text, and formulas by address (e.g

#### get\_used\_range

Get the used range of a worksheet (the smallest range covering all cells with data)

#### update\_range

Write values, formulas, or number formats to a bounded range (e.g

#### clear\_range

Clear a range's contents, formats, or both

#### list\_tables

List all tables in a workbook

#### get\_table

Get a table by name or ID

#### add\_table

Create a table over a range, e.g

#### update\_table

Update a table's name, header/totals visibility, or style

#### delete\_table

Delete a table (the underlying cells remain)

#### list\_table\_rows

List data rows of a table

#### add\_table\_row

Add one or more rows to a table

#### delete\_table\_row

Delete a table row by zero-based index

#### list\_table\_columns

List columns of a table, including their values

#### add\_table\_column

Add a column to a table

#### sort\_table

Sort a table by one or more columns

#### list\_workbooks

List Excel (.xlsx) workbooks in the user's OneDrive/SharePoint

#### create\_workbook

Create a new, empty Excel (.xlsx) workbook in OneDrive and return its driveItem ID (use it as item\_id in other tools)

#### delete\_workbook

Delete an Excel workbook from OneDrive/SharePoint by its driveItem ID

#### create\_session

Create an Excel workbook session and return a session\_id

#### close\_session

Close an Excel workbook session created with create\_session

#### list\_worksheets

List worksheets in a workbook

#### get\_worksheet

Get a worksheet by name or ID

#### add\_worksheet

Add a new worksheet to a workbook

#### update\_worksheet

Update a worksheet's name, position, or visibility

#### delete\_worksheet

Delete a worksheet by name or ID