> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Microsoft Excel

The Microsoft Excel connector lets your AI agent act in each user's Microsoft Excel account. Each user signs in to Microsoft Excel once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 47 tools.

**Authentication:** OAuth 2.0
**Categories:** Files & Documents, Analytics
**Tools:** 47: 16 read, 24 write, 7 destructive
**Users sign in with:** OAuth
**OAuth app:** Scalekit's or your own
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=MICROSOFTEXCEL)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Microsoft Excel connection

   In **AgentKit > Connections**, create a Microsoft Excel connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

   Scalekit credentials are available for Microsoft Excel, so you don't need to register an OAuth app. To show your own app on the consent screen, use your own credentials instead.

   **Use your own OAuth app:**

   Register your Scalekit environment with the Microsoft Excel connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

   1. ### Set up auth redirects

       - In [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** > **Create Connection**. Find **Excel** and click **Create**. Copy the redirect URI. It will look like `https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback`.

         > Image: Copy redirect URI from Scalekit dashboard

       - Sign into [portal.azure.com](https://portal.azure.com) and go to **Microsoft Entra ID** → **App registrations** → **New registration**.

       - Enter a name for your app.

       - Under **Supported account types**, select **Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts**.

       - Under **Redirect URI**, select **Web** and paste the redirect URI from step 1. Click **Register**.

         > Image: Register an application in Azure portal

   2. ### Get your client credentials

       - Go to **Certificates & secrets** → **New client secret**, set an expiry, and click **Add**. Copy the **Value** immediately.

       - From the **Overview** page, copy the **Application (client) ID**.

   3. ### Add credentials in Scalekit

       - In [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** and open the connection you created.

       - Enter your credentials:
         - Client ID (Application (client) ID from Azure)
         - Client Secret (from Certificates & secrets)
         - Permissions (scopes — see [Microsoft Graph permissions reference](https://learn.microsoft.com/en-us/graph/permissions-reference))

         > Image: Add credentials in Scalekit dashboard
       - Click **Save**.

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'microsoftexcel'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Microsoft Excel:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'microsoftexcel_export_to_pdf',
     toolInput: { item_id: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K' },
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "microsoftexcel"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Microsoft Excel:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"},
       tool_name="microsoftexcel_export_to_pdf",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'microsoftexcel_calculate_function',
  toolInput: {
    arguments: {},
    function_name: 'pmt',
    item_id: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K',
  },
  connector: 'microsoftexcel',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="microsoftexcel_calculate_function",
    tool_input={
        "arguments": {},
        "function_name": "pmt",
        "item_id": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K",
    },
    connection_name="microsoftexcel",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `microsoftexcel_calculate_function`

Calculate Excel Function · Read-only

Invoke any built-in Excel worksheet function (e.g. PMT, SUM, VLOOKUP, TEXTJOIN) directly against a workbook stored in OneDrive and return its computed result, without needing to write the formula into a cell first.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `arguments` (`object`, required): Named arguments for the function, matching the function's parameter names. Example for pmt: {"rate": 0.045, "nper": 12, "pv": -1250}.
- `function_name` (`string`, required): The name of the Excel function to invoke, in lowercase (e.g. 'pmt', 'sum', 'vlookup').
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header.

Example input: `{"arguments":{},"function_name":"pmt","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"}`

### `microsoftexcel_export_to_pdf`

Export Excel to PDF · Read-only

Export an Excel workbook stored in OneDrive to PDF format. Uses the Microsoft Graph OneDrive content endpoint with format=pdf query parameter. Returns the PDF binary content. The response may be a direct 200 with the PDF body or a 302 redirect to a download URL depending on file size.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file to export. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"}`

### `microsoftexcel_get_chart_image`

Get Chart Image · Read-only

Render an Excel chart to a base64-encoded image, useful for embedding a snapshot of the chart in a report, email, or dashboard without opening the workbook.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `chart_id` (`string`, required): Name or ID of the chart to render. Use List Charts to find it.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the chart.
- `height` (`integer`, optional): Desired image height in pixels. Use 0 to keep the chart's natural height.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header.
- `width` (`integer`, optional): Desired image width in pixels. Use 0 to keep the chart's natural width.

Example input: `{"chart_id":"Chart 1","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_get_named_item`

Get Named Item · Read-only

Retrieve the definition of a single named item (named range or named formula) in an Excel workbook stored in OneDrive, by its name.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file.
- `name` (`string`, required): The name of the named item to retrieve.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","name":"Column1"}`

### `microsoftexcel_get_range`

Get Excel Range · Read-only

Retrieve the values, formulas, format, and address of a cell range in an Excel worksheet stored in OneDrive. Specify the range using standard Excel notation (e.g., 'A1:C10' or 'B2'). Optionally accepts a workbook session ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address` (`string`, required): Cell range address in Excel notation to retrieve. Examples: 'A1' for a single cell, 'A1:C10' for a multi-cell range, 'Sheet1!A1:B5' to target a specific sheet within the address.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the range. Example: 'Sheet1' or '{00000000-0001-0000-0000-000000000000}'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"address":"A1:D10","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_get_table`

Get Excel Table · Read-only

Retrieve details of a specific table in an Excel workbook stored in OneDrive, including its name, style, column count, and header/total row settings. Accepts either a numeric table ID or the table name.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Table name or numeric ID to retrieve. Example: 'Table1' or '1'. Both the table name and the workbook-assigned numeric ID are accepted.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_get_used_range`

Get Worksheet Used Range · Read-only

Retrieve the smallest range that contains any data or formatting on an Excel worksheet stored in OneDrive, without needing to already know the address. Useful for reading all the data on a sheet in one call.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file.
- `worksheet_id` (`string`, required): Worksheet name or GUID whose used range to retrieve.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_get_worksheet`

Get Excel Worksheet · Read-only

Retrieve the properties of a specific worksheet in an Excel workbook stored in OneDrive. Use the worksheet name or its GUID as the worksheet_id. Optionally accepts a workbook session ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): The worksheet name or GUID to retrieve. Use the sheet tab name (e.g., 'Sheet1') or the worksheet's unique GUID. Example: 'Sheet1' or '{00000000-0001-0000-0000-000000000000}'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_list_charts`

List Excel Charts · Read-only

List all charts in an Excel worksheet stored in OneDrive. Returns chart names, IDs, type, dimensions, and position. Supports OData $top for pagination.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the charts to list. Example: 'Sheet1'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `top` (`integer`, optional): Maximum number of charts to return (1–1000). Defaults to server-defined page size.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_list_comments`

List Excel Comments · Read-only

List all comments in an Excel workbook stored in OneDrive. Returns comment IDs, author information, content, cell location, and creation date. Supports OData $top for pagination.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `top` (`integer`, optional): Maximum number of comments to return (1–1000). Defaults to server-defined page size.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"}`

### `microsoftexcel_list_named_items`

List Excel Named Items · Read-only

List all named items (named ranges and constants) in an Excel workbook stored in OneDrive. Returns the name, type, value, and scope for each named item. Supports OData $top for pagination and $select for field projection.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `select` (`string`, optional): Comma-separated list of properties to return for each named item. Example: 'name,type,value' to return only those fields.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `top` (`integer`, optional): Maximum number of named items to return (1–1000). Defaults to server-defined page size.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"}`

### `microsoftexcel_list_pivot_tables`

List Excel PivotTables · Read-only

List all PivotTables on a worksheet in an Excel workbook stored in OneDrive. Returns each PivotTable's name and ID. PivotTables are not covered by any other existing tool.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the PivotTables to list. Example: 'Sheet1'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `top` (`integer`, optional): Maximum number of PivotTables to return (1–1000). Defaults to server-defined page size.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_list_table_columns`

List Excel Table Columns · Read-only

List all columns in an Excel table in a workbook stored in OneDrive. Returns column objects including their name, index, and values. Supports OData pagination with $top and field selection with $select.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Table name or numeric ID whose columns to list. Example: 'Table1' or '1'.
- `select` (`string`, optional): Comma-separated list of properties to return for each column. Example: 'id,name' to return only the column ID and name.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `top` (`integer`, optional): Maximum number of columns to return. Useful for tables with many columns. Example: 10.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_list_table_rows`

List Excel Table Rows · Read-only

List rows in an Excel table stored in OneDrive. Returns an array of row objects, each containing a values array with the cell data. Supports OData pagination with $top and $skip.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Table name or numeric ID whose rows to list. Example: 'Table1' or '1'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `skip` (`integer`, optional): Number of rows to skip for pagination. Use in combination with $top to page through large tables. Example: 20 to skip the first 20 rows.
- `top` (`integer`, optional): Maximum number of rows to return. Defaults to server page size. Example: 50 to return up to 50 rows.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_list_tables`

List Excel Tables · Read-only

List all tables in an Excel workbook stored in OneDrive. Returns table names, IDs, style, and header/total row settings. Supports OData query options for pagination and field selection.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `select` (`string`, optional): Comma-separated list of properties to return. Example: 'id,name,style' to return only those fields for each table.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `top` (`integer`, optional): Maximum number of tables to return (1–1000). Defaults to server-defined page size.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"}`

### `microsoftexcel_list_worksheets`

List Excel Worksheets · Read-only

List all worksheets in an Excel workbook stored in OneDrive. Supports OData query parameters for field selection and pagination. Optionally accepts a workbook session ID for session-based access.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `select` (`string`, optional): Comma-separated list of properties to return for each worksheet. Example: 'id,name,position,visibility'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header for session-based access. Example: 'cluster=SN2&session=...'.
- `top` (`integer`, optional): Maximum number of worksheets to return. Example: 10.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"}`

### `microsoftexcel_add_named_item`

Add Named Item · Write

Define a new named item (named range or named formula) in an Excel workbook stored in OneDrive. Named items let formulas and other tools refer to a range or value by a memorable name instead of a cell address.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file.
- `name` (`string`, required): The name to assign to the new named item. Must be unique within the workbook.
- `reference` (`string`, required): A formula-style string starting with '=' that this name refers to — either a range address (e.g. '=Sheet1!$A$1:$B$10') or a computed formula (e.g. '=SUM(Sheet1!A1:A10)').
- `comment` (`string`, optional): Optional comment describing the named item.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","name":"Column1","reference":"=Sheet1!$A$1:$B$10"}`

### `microsoftexcel_add_table_column`

Add Excel Table Column · Write

Add a new column to an existing Excel table in OneDrive. Optionally specify the column name, its zero-based insertion index (null = append at end), and initial cell values as a 2D array (first row is the header). Returns the created column object.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Name or ID of the table to add the column to. Example: 'Table1' or the GUID assigned by Excel.
- `index` (`integer`, optional): Zero-based index position at which to insert the column. Null or omitted means append the column at the right end of the table. Example: 0 inserts as the first column.
- `name` (`string`, optional): Display name for the new column header. If omitted, Excel auto-generates a name (e.g., 'Column1'). Example: 'Revenue'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `values` (`array`, optional): 2D array of initial cell values for the column, including the header row in the first element. Example: [["Header"],["row1val"],["row2val"]]. Each inner array is one row. If omitted, the column is created empty.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_add_table_row`

Add Excel Table Row · Write

Add a new row to an Excel table in a workbook stored in OneDrive. Provide a 2D array of values (one inner array per row to insert). Optionally specify an index to insert the row at a specific position; omit index to append to the end of the table.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Table name or numeric ID to add a row to. Example: 'Table1' or '1'.
- `values` (`array`, required): 2D array of values to insert as a new row. Each inner array represents one row; each element is a cell value (string, number, boolean, or null). The number of elements in each inner array must match the table's column count. Example: [["Alice", 95, true]] inserts one row with three cells.
- `index` (`integer`, optional): Zero-based index at which to insert the row. If null or omitted, the row is appended to the end of the table. Example: 0 inserts at the top of the table.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1","values":["Active","Pending"]}`

### `microsoftexcel_clear_range`

Clear Excel Range · Write

Clear the contents, formats, or both from a cell range in an Excel worksheet stored in OneDrive. Use apply_to to control what is cleared: 'All' clears both content and formatting, 'Contents' clears only values and formulas, 'Formats' clears only cell formatting.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `address` (`string`, required): Cell range address in Excel notation to clear. Examples: 'A1:C10' to clear a multi-cell range, 'B2' to clear a single cell.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the range to clear. Example: 'Sheet1'.
- `apply_to` (`string`, optional): What to clear from the range. Valid values: 'All' (clears both content and formatting, default), 'Contents' (clears only values and formulas), 'Formats' (clears only cell formatting). One of: `All`, `Contents`, `Formats`. Default: `All`.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"address":"A1:D10","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_clear_table_filter`

Clear Excel Table Filter · Write

Clear an active filter on a table column, complementing Filter Excel Table Column (apply), which has no corresponding clear action of its own.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `column_id` (`string`, required): Name or ID of the column within the table whose filter should be cleared. Example: 'Status' or the column's integer ID.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Name or ID of the table whose column filter should be cleared. Example: 'Table1' or the GUID assigned by Excel.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"column_id":"Status","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_close_session`

Close Excel Workbook Session · Write

Close an active workbook session for an Excel file in OneDrive. Releases server-side resources associated with the session. Pass the session ID returned by the createSession call as session_id.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file whose session should be closed. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `session_id` (`string`, required): Workbook session ID returned by the createSession call. Sent as the workbook-session-id request header to identify which session to close. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","session_id":"cluster=SN2&session=..."}`

### `microsoftexcel_copy_worksheet`

Copy Worksheet · Write

Duplicate a worksheet within the same Excel workbook stored in OneDrive, including its data, formatting, and charts. The copy is placed relative to an existing worksheet.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file.
- `worksheet_id` (`string`, required): Worksheet name or GUID to copy.
- `position_type` (`string`, optional): Where to place the new worksheet relative to relative_to (or absolutely for Beginning/End). Defaults to After. One of: `None`, `Before`, `After`, `Beginning`, `End`.
- `relative_to` (`string`, optional): Worksheet name or GUID that position_type (Before/After) is relative to. Defaults to the source worksheet.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_create_chart`

Create Excel Chart · Write

Create a new chart in an Excel worksheet stored in OneDrive. Specify the chart type (e.g., ColumnClustered, Line, Pie), the source data range address (e.g., 'A1:B10'), and optionally how series are arranged (Auto, Columns, Rows). Returns the created chart object including its ID.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `source_data` (`string`, required): Cell range address providing the chart source data in Excel notation. Example: 'A1:B10' uses columns A and B, rows 1–10 as the chart data.
- `worksheet_id` (`string`, required): Worksheet name or GUID in which to create the chart. Example: 'Sheet1'.
- `chart_type` (`string`, optional): Type of chart to create. Valid values: ColumnClustered, ColumnStacked, ColumnStacked100, BarClustered, BarStacked, BarStacked100, Line, LineStacked, LineMarkers, Pie, Doughnut, Scatter, Area, Radar, XYScatter. Default is 'ColumnClustered'. One of: `ColumnClustered`, `ColumnStacked`, `ColumnStacked100`, `BarClustered`, `BarStacked`, `BarStacked100`, `Line`, `LineStacked`, `LineMarkers`, `Pie`, `Doughnut`, `Scatter`, `XYScatter`, `Area`, `AreaStacked`, `Radar`. Default: `ColumnClustered`.
- `series_by` (`string`, optional): How data series are determined from the source range. Valid values: 'Auto' (Excel decides), 'Columns' (each column is a series), 'Rows' (each row is a series). Default is 'Auto'. One of: `Auto`, `Columns`, `Rows`. Default: `Auto`.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","source_data":"A1:B10","worksheet_id":"Sheet1"}`

### `microsoftexcel_create_session`

Create Excel Workbook Session · Write

Create a workbook session for an Excel file in OneDrive. Returns a session ID that can be passed as the workbook-session-id header in subsequent Excel API calls to maintain state and improve performance. Requires the OneDrive item ID of the .xlsx file.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file to open a session for. Obtain this from the OneDrive file listing or drive item API. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `persist_changes` (`boolean`, optional): Whether to persist changes made during the session to the workbook. Set to true (default) to save changes; set to false for a read-only transient session that does not commit edits. Default: `true`.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"}`

### `microsoftexcel_create_table`

Create Excel Table · Write

Create a new Excel table from a cell range in a worksheet stored in OneDrive. Specify the address of the range (e.g., 'A1:D10') and whether the first row contains headers. Returns the created table object including its assigned ID and name.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `address` (`string`, required): Cell range address for the new table in Excel notation. Example: 'A1:D10' creates a table spanning columns A–D and rows 1–10.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID in which to create the table. Example: 'Sheet1'.
- `has_headers` (`boolean`, optional): Whether the first row of the range contains column headers. When true (default), the first row becomes the header row of the table. When false, Excel auto-generates header names. Default: `true`.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"address":"A1:D10","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_create_worksheet`

Create Excel Worksheet · Write

Add a new worksheet to an Excel workbook stored in OneDrive. Specify the sheet name. Returns the newly created worksheet object including its ID, name, position, and visibility.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file to add the worksheet to. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `name` (`string`, required): Name for the new worksheet tab. Must be unique within the workbook and cannot exceed 31 characters. Example: 'Q1 Sales'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","name":"Q1 Sales"}`

### `microsoftexcel_filter_table`

Filter Excel Table Column · Write

Apply a filter to a column in an Excel table stored in OneDrive. Specify the filter criteria type (e.g., Values, Dynamic, Top, Custom) and the values or criteria to filter by. For 'Values' filtering, provide an array of exact string values to show. The filter is applied in place; no data is returned.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `column_id` (`string`, required): Name or ID of the column within the table on which to apply the filter. Example: 'Status' or the column's integer ID.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Name or ID of the table to filter. Example: 'Table1' or the GUID assigned by Excel.
- `values` (`array`, required): Array of string values to filter by when filter_on is 'Values'. Only rows whose cell in this column matches one of these values will be shown. Example: ["Active", "Pending"].
- `filter_on` (`string`, optional): Filter type that determines how the criteria are applied. Valid values: 'Values' (match exact values), 'Custom' (custom expression), 'CellColor' (cell background color), 'FontColor' (cell font color), 'Dynamic' (dynamic filter such as Above Average), 'Top10' (top or bottom N items), 'Icon' (cell icon). Default is 'Values'. One of: `Values`, `Custom`, `CellColor`, `FontColor`, `Dynamic`, `Top10`, `Icon`. Default: `Values`.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"column_id":"Status","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1","values":["Active","Pending"]}`

### `microsoftexcel_merge_range`

Merge Excel Range · Write

Merge a cell range in an Excel worksheet stored in OneDrive. Specify the range address (e.g., 'A1:C3') and optionally set 'across' to true to merge each row separately rather than merging the entire block into one cell.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `address` (`string`, required): Cell range address in Excel notation to merge. Examples: 'A1:C3' for a 3-column by 3-row block, 'B2:D4' for a rectangular range.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the range to merge. Example: 'Sheet1'.
- `across` (`boolean`, optional): When true, merges cells in each row of the range separately (row-by-row merge) instead of merging the entire block into a single cell. Defaults to false. Default: `false`.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"address":"A1:D10","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_protect_worksheet`

Protect Excel Worksheet · Write

Apply protection to a worksheet in an Excel workbook stored in OneDrive. You can optionally set a password and configure which actions are allowed while the sheet is protected (e.g., allow formatting cells but prevent deleting rows).

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID to protect. Example: 'Sheet1' or '{00000000-0001-0000-0000-000000000000}'.
- `allow_auto_filter` (`boolean`, optional): Whether to allow AutoFilter operations while the worksheet is protected. Default is false.
- `allow_delete_columns` (`boolean`, optional): Whether to allow deleting columns while the worksheet is protected. Default is false.
- `allow_delete_rows` (`boolean`, optional): Whether to allow deleting rows while the worksheet is protected. Default is false.
- `allow_format_cells` (`boolean`, optional): Whether to allow formatting cells while the worksheet is protected. Default is false.
- `allow_format_columns` (`boolean`, optional): Whether to allow formatting columns while the worksheet is protected. Default is false.
- `allow_format_rows` (`boolean`, optional): Whether to allow formatting rows while the worksheet is protected. Default is false.
- `allow_insert_columns` (`boolean`, optional): Whether to allow inserting columns while the worksheet is protected. Default is false.
- `allow_insert_hyperlinks` (`boolean`, optional): Whether to allow inserting hyperlinks while the worksheet is protected. Default is false.
- `allow_insert_rows` (`boolean`, optional): Whether to allow inserting rows while the worksheet is protected. Default is false.
- `allow_pivot_tables` (`boolean`, optional): Whether to allow PivotTable operations while the worksheet is protected. Default is false.
- `allow_sort` (`boolean`, optional): Whether to allow sorting while the worksheet is protected. Default is false.
- `password` (`string`, optional): Optional password to protect the worksheet. If set, users must enter this password to unprotect the sheet. Example: 'MySecretPass123'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_refresh_all_pivot_tables`

Refresh All Excel PivotTables · Write

Refresh every PivotTable on a worksheet in one call, picking up any changes made to their underlying source data since they were last refreshed.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID whose PivotTables should all be refreshed. Example: 'Sheet1'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_refresh_pivot_table`

Refresh Excel PivotTable · Write

Refresh a single PivotTable's data from its source range, picking up any changes made to the underlying data since it was last refreshed.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `pivot_table_id` (`string`, required): Name or ID of the PivotTable to refresh. Use List Excel PivotTables to find it.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the PivotTable. Example: 'Sheet1'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","pivot_table_id":"<pivot_table_id>","worksheet_id":"Sheet1"}`

### `microsoftexcel_set_chart_data`

Set Excel Chart Data · Write

Repoint an existing chart at a new source data range and/or seriesBy setting. Distinct from Update Excel Chart, which per Microsoft's docs only changes position/size/title properties, not the underlying data the chart plots.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `chart_id` (`string`, required): Name or ID of the chart to repoint. Example: 'Chart 1' or the GUID assigned by Excel.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `source_data` (`string`, required): The new range address the chart should plot, e.g. 'A1:B4' or 'Sheet1!A1:B4'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the chart. Example: 'Sheet1'.
- `series_by` (`string`, optional): Whether the chart series should be created from rows or columns of the source data. Accepted values: Auto, Columns, Rows. Defaults to Auto. One of: `Auto`, `Columns`, `Rows`.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"chart_id":"Chart 1","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","source_data":"A1:B4","worksheet_id":"Sheet1"}`

### `microsoftexcel_sort_range`

Sort Excel Range · Write

Apply a sort to a cell range in an Excel worksheet stored in OneDrive. Specify one or more sort fields defining which column index to sort by and whether to sort ascending or descending. Optionally control case sensitivity and whether the range has a header row.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `address` (`string`, required): Cell range address in Excel notation to sort. Example: 'A1:D20' to sort a 4-column, 20-row range.
- `fields` (`array`, required): Array of sort field objects defining the sort criteria. Each object must have a 'key' (zero-based column index within the range) and optionally 'ascending' (bool, default true) and 'sortOn' (e.g., 'Value', 'CellColor', 'FontColor', 'Icon'). Example: [{"key": 0, "ascending": true, "sortOn": "Value"}].
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the range to sort. Example: 'Sheet1'.
- `has_headers` (`boolean`, optional): Whether the range has a header row that should not be sorted. Default is true — the first row is treated as a header and excluded from sorting. Default: `true`.
- `match_case` (`boolean`, optional): Whether the sort is case-sensitive. Default is false (case-insensitive). Default: `false`.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"address":"A1:D20","fields":[{"key":0,"ascending":true,"sortOn":"Value"}],"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_sort_table`

Sort Excel Table · Write

Apply a sort to an Excel table stored in OneDrive. Provide one or more sort field objects specifying the zero-based column key within the table, sort direction (ascending/descending), and sort basis (Value, CellColor, FontColor, Icon). Optionally control case sensitivity. The sort is applied in place; no data is returned.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fields` (`array`, required): Array of sort field objects defining the sort criteria. Each object must include 'key' (zero-based column index within the table). Optionally include 'ascending' (bool, default true) and 'sortOn' (e.g., 'Value', 'CellColor', 'FontColor', 'Icon'). Example: [{"key": 0, "ascending": true, "sortOn": "Value"}].
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Name or ID of the table to sort. Example: 'Table1' or the GUID assigned by Excel.
- `match_case` (`boolean`, optional): Whether the sort is case-sensitive. Default is false (case-insensitive). Example: set to true to distinguish 'Apple' from 'apple'. Default: `false`.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"fields":[{"key":0,"ascending":true,"sortOn":"Value"}],"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_unmerge_range`

Unmerge Excel Range · Write

Unmerge a previously merged cell range in an Excel worksheet stored in OneDrive. Specify the range address to split any merged cells back into individual cells.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `address` (`string`, required): Cell range address in Excel notation to unmerge. Example: 'A1:C3' to unmerge a block that was previously merged.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the range to unmerge. Example: 'Sheet1'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"address":"A1:C3","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_update_chart`

Update Excel Chart · Write

Update properties of an existing chart in an Excel worksheet stored in OneDrive. You can update the chart title text, dimensions (height, width in points), and position (left, top offsets in points). Only fields provided will be updated. Returns the updated chart object.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `chart_id` (`string`, required): Name or ID of the chart to update. Example: 'Chart 1' or the GUID assigned by Excel.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the chart. Example: 'Sheet1'.
- `height` (`integer`, optional): Height of the chart in points. Example: 300 sets the chart height to 300 points.
- `left` (`integer`, optional): Left offset of the chart from the worksheet origin in points. Example: 0 positions the chart at the left edge.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `title` (`string`, optional): New text for the chart title. Example: 'Monthly Revenue'. This wraps to the Graph API shape {"title":{"text":"..."}}.
- `top` (`integer`, optional): Top offset of the chart from the worksheet origin in points. Example: 0 positions the chart at the top edge.
- `width` (`integer`, optional): Width of the chart in points. Example: 400 sets the chart width to 400 points.

Example input: `{"chart_id":"Chart 1","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_update_range`

Update Excel Range · Write

Write values, formulas, or number formats to a cell range in an Excel worksheet stored in OneDrive. Provide a 2D array of values matching the dimensions of the target range. Optionally set formulas and number formats for cells.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address` (`string`, required): Cell range address in Excel notation to update. Must match the dimensions of the values array. Examples: 'A1:C2' for a 2-row by 3-column range, 'B5' for a single cell.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `values` (`array`, required): 2D array of cell values to write. Each inner array represents a row; each element is a cell value (string, number, boolean, or null). Example: [["Name", "Score"], ["Alice", 95], ["Bob", 87]].
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the range to update. Example: 'Sheet1'.
- `formulas` (`array`, optional): 2D array of formula strings to write. Each inner array represents a row; each element is a cell formula string (e.g., '=SUM(A1:A5)') or null to leave blank. Must match the dimensions of the address range.
- `number_format` (`array`, optional): 2D array of number format strings to apply. Each element is an Excel number format code (e.g., 'mm/dd/yyyy', '0.00', '@' for text). Must match the dimensions of the address range.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"address":"A1:D10","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","values":["Active","Pending"],"worksheet_id":"Sheet1"}`

### `microsoftexcel_update_table`

Update Excel Table · Write

Update the properties of an existing Excel table in a workbook stored in OneDrive. Supports renaming the table, toggling header and total rows, and changing the table style.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Table name or numeric ID to update. Example: 'Table1' or '1'.
- `name` (`string`, optional): New name for the table. Must be unique within the workbook. Example: 'SalesData'. Only alphanumeric characters and underscores; must not start with a number.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `show_headers` (`boolean`, optional): Whether to show the header row of the table. Set to true to display column headers, false to hide them.
- `show_totals` (`boolean`, optional): Whether to show the totals row at the bottom of the table. Set to true to display the totals row, false to hide it.
- `style` (`string`, optional): Table style name to apply. Valid values follow the Excel table style naming convention, e.g., 'TableStyleLight1', 'TableStyleMedium2', 'TableStyleDark3'. See Excel table styles for available options.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_update_worksheet`

Update Excel Worksheet · Write

Update properties of an existing worksheet in an Excel workbook stored in OneDrive. You can rename the sheet, change its tab position, or change its visibility. At least one of name, position, or visibility must be provided.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID to update. Example: 'Sheet1' or '{00000000-0001-0000-0000-000000000000}'.
- `name` (`string`, optional): New name for the worksheet tab. Must be unique within the workbook and no longer than 31 characters. Example: 'Q2 Sales'.
- `position` (`integer`, optional): Zero-based index position of the worksheet among other sheets. Example: 0 makes it the first sheet.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.
- `visibility` (`string`, optional): Visibility of the worksheet. Valid values: 'Visible' (shown), 'Hidden' (hidden but can be unhidden by user), 'VeryHidden' (hidden and cannot be unhidden from the UI). One of: `Visible`, `Hidden`, `VeryHidden`.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_convert_table_to_range`

Convert Table to Range · Destructive

Convert an Excel table back into a plain cell range, removing table formatting and behaviors (filters, structured references, banding) while keeping the underlying data in place.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file.
- `table_id` (`string`, required): Name or ID of the table to convert. Use List Tables to find it.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_delete_chart`

Delete Excel Chart · Destructive

Delete a chart from an Excel worksheet stored in OneDrive. This permanently removes the chart from the worksheet. Requires the OneDrive item ID, worksheet name or GUID, and chart name or GUID.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `chart_id` (`string`, required): Name or ID of the chart to delete. Example: 'Chart 1' or the GUID assigned by Excel.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID containing the chart to delete. Example: 'Sheet1'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"chart_id":"Chart 1","item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

### `microsoftexcel_delete_named_item`

Delete Named Item · Destructive

Delete a named item (named range or named formula) definition from an Excel workbook stored in OneDrive. This removes the name only; the underlying cells and their data are not affected.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file.
- `name` (`string`, required): The name of the named item to delete.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","name":"Column1"}`

### `microsoftexcel_delete_table`

Delete Excel Table · Destructive

Permanently delete a table from an Excel workbook stored in OneDrive. The underlying cell data is preserved but the table formatting and structure are removed. This action cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Table name or numeric ID to delete. Example: 'Table1' or '1'. This permanently removes the table structure (cell data is kept).
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_delete_table_column`

Delete Excel Table Column · Destructive

Delete a column from an Excel table by its zero-based index. This permanently removes the column and all its data from the table. Requires the OneDrive item ID, table name or ID, and the column index to delete.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `column_index` (`integer`, required): Zero-based index of the column to delete within the table. Example: 0 deletes the first column, 2 deletes the third column.
- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `table_id` (`string`, required): Name or ID of the table containing the column to delete. Example: 'Table1' or the GUID assigned by Excel.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"column_index":0,"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","table_id":"Table1"}`

### `microsoftexcel_delete_table_row`

Delete Excel Table Row · Destructive

Permanently delete a row from an Excel table in a workbook stored in OneDrive by its zero-based row index. All rows below the deleted row shift up by one. This action cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `row_index` (`integer`, required): Zero-based index of the row to delete within the table. The header row is not counted; index 0 refers to the first data row. Example: 0 deletes the first data row.
- `table_id` (`string`, required): Table name or numeric ID from which to delete the row. Example: 'Table1' or '1'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","row_index":0,"table_id":"Table1"}`

### `microsoftexcel_delete_worksheet`

Delete Excel Worksheet · Destructive

Permanently delete a worksheet from an Excel workbook stored in OneDrive. This action cannot be undone. The workbook must have at least one remaining visible worksheet after deletion.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `item_id` (`string`, required): OneDrive item ID of the Excel (.xlsx) file. Example: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'.
- `worksheet_id` (`string`, required): Worksheet name or GUID to delete. Example: 'Sheet1' or '{00000000-0001-0000-0000-000000000000}'.
- `session_id` (`string`, optional): Optional workbook session ID from createSession. When provided, sent as the workbook-session-id header. Example: 'cluster=SN2&session=...'.

Example input: `{"item_id":"01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K","worksheet_id":"Sheet1"}`

## Workflows

**Proxy API call**

  **Node.js**

  ```typescript
  // Make a request via Scalekit proxy
  const result = await actions.request({
    connectionName: 'microsoftexcel',
    identifier: 'user_123',
    path: '/v1.0/me/drive/root/children',
    method: 'GET',
  });
  console.log(result);
  ```

  **Python**

  ```python
  # Make a request via Scalekit proxy
  result = actions.request(
      connection_name='microsoftexcel',
      identifier='user_123',
      path="/v1.0/me/drive/root/children",
      method="GET"
  )
  print(result)
  ```

**Execute a tool**

  **Node.js**

  ```typescript
  const result = await actions.executeTool({
    connector: 'microsoftexcel',
    identifier: 'user_123',
    toolName: 'microsoftexcel_list_worksheets',
    toolInput: { item_id: '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K' },
  });
  console.log(result);
  ```

  **Python**

  ```python
  result = actions.execute_tool(
      connection_name='microsoftexcel',
      identifier='user_123',
      tool_name='microsoftexcel_list_worksheets',
      tool_input={'item_id': '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K'},
  )
  print(result)
  ```

## Related

Other Files & Documents connectors ([all 33](/agentkit/connectors/?category=files-documents)):

- [Google Drive](/agentkit/connectors/googledrive/): Scalekit connector, OAuth, 47 tools
- [Google Forms](/agentkit/connectors/googleforms/): Scalekit connector, OAuth, 10 tools
- [Microsoft 365](/agentkit/connectors/microsoft365/): Scalekit connector, OAuth, 317 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
