What can you do with it?

Microsoft Excel integration allows you to programmatically manage spreadsheets and data through the Microsoft Graph API. You can search for Excel files, create and manage worksheets, update cell values, work with tables including adding, updating and deleting rows, and perform data operations like filtering and sorting. This integration is perfect for automated reporting, data processing workflows, spreadsheet management, and building data-driven applications that interact with Excel files stored in OneDrive for Business or SharePoint.

How to use it?

Basic Command Structure

/your-Microsoft-Excel-connection [action] [required-parameters] [optional-parameters]

Parameters

Required:

  • action - The operation to perform with Excel

Tools

Search Excel Files

Find Excel files by name in your OneDrive

Parameters:

  • filename (required) - Name or partial name of the Excel file

Example:

/your-Microsoft-Excel-connection
action: search-file
filename: Sales Report

Response:

{
  "value": [
    {
      "name": "Sales Report 2024.xlsx",
      "id": "01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR",
      "lastModified": "2025-02-05T00:43:08Z",
      "webUrl": "https://onedrive.live.com/...",
      "workbookId": "01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR"
    }
  ]
}

List Worksheets

Get all worksheets in a workbook

Parameters:

  • workbook-id (required) - The ID of the Excel workbook

Example:

/your-Microsoft-Excel-connection
action: list-worksheets
workbook-id: 01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR

Response:

{
  "value": [
    {
      "id": "{00000000-0001-0000-0000-000000000000}",
      "name": "Sheet1",
      "position": 0,
      "visibility": "Visible"
    },
    {
      "id": "{00000000-0002-0000-0000-000000000000}",
      "name": "Summary",
      "position": 1
    }
  ]
}

Create Worksheet

Add a new worksheet to a workbook

Parameters:

  • workbook-id (required) - The ID of the Excel workbook
  • sheet-name (required) - Name for the new worksheet

Example:

/your-Microsoft-Excel-connection
action: create-worksheet
workbook-id: 01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR
sheet-name: Q1 Data

Response:

{
  "id": "{75A18F35-34AA-4F44-97CC-FDC3C05D9F40}",
  "name": "Q1 Data",
  "position": 2,
  "visibility": "Visible"
}

Update Cell Value

Update the value of a specific cell or range

Parameters:

  • workbook-id (required) - The ID of the Excel workbook
  • worksheet-id (required) - The ID or name of the worksheet
  • cell-range (required) - Cell address (e.g., A1) or range (e.g., A1:B2)
  • value (required) - Value(s) to insert

Example:

/your-Microsoft-Excel-connection
action: update-cell
workbook-id: 01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR
worksheet-id: Sheet1
cell-range: A1
value: Total Sales

Response:

{
  "status": "success",
  "range": "A1",
  "values": [["Total Sales"]]
}

Create Table

Create a new table in a worksheet

Parameters:

  • workbook-id (required) - The ID of the Excel workbook
  • worksheet-id (required) - The ID or name of the worksheet
  • table-range (required) - Range for the table (e.g., A1:D10)
  • has-headers (optional) - Whether first row contains headers (default: true)

Example:

/your-Microsoft-Excel-connection
action: create-table
workbook-id: 01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR
worksheet-id: Sheet1
table-range: A1:D10
has-headers: true

Response:

{
  "id": "Table1",
  "name": "Table1",
  "showHeaders": true,
  "showTotals": false,
  "style": "TableStyleMedium2"
}

Add Table Row

Add a new row to an existing table

Parameters:

  • workbook-id (required) - The ID of the Excel workbook
  • table-id (required) - The ID of the table
  • row-data (required) - Array of values for the new row

Example:

/your-Microsoft-Excel-connection
action: add-table-row
workbook-id: 01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR
table-id: Table1
row-data: ["Product A", 100, 25.99, 2599.00]

Response:

{
  "index": 10,
  "values": [["Product A", 100, 25.99, 2599.00]]
}

Get Table Data

Retrieve all data from a table

Parameters:

  • workbook-id (required) - The ID of the Excel workbook
  • table-id (required) - The ID of the table

Example:

/your-Microsoft-Excel-connection
action: get-table-data
workbook-id: 01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR
table-id: Table1

Response:

{
  "value": [
    {
      "index": 0,
      "values": [["Product A", 100, 25.99, 2599.00]]
    },
    {
      "index": 1,
      "values": [["Product B", 50, 35.99, 1799.50]]
    }
  ]
}

Delete Worksheet

Remove a worksheet from a workbook

Parameters:

  • workbook-id (required) - The ID of the Excel workbook
  • worksheet-id (required) - The ID or name of the worksheet to delete

Example:

/your-Microsoft-Excel-connection
action: delete-worksheet
workbook-id: 01HRDJMGPNAGXLOFE4URDYNKMBXOIES4BR
worksheet-id: Old Data

Response:

{
  "status": "deleted",
  "message": "Worksheet 'Old Data' successfully deleted"
}

Notes

Only .xlsx files (Office Open XML format) are supported - .xls files cannot be used. Works with OneDrive for Business and SharePoint, but not OneDrive Consumer accounts. Both PinkConnect and Paragon proxies are supported with different endpoint structures. Worksheet IDs containing special characters must be URL encoded. When working with tables, always fetch the workbook ID first using the search function.