Excel
Read and edit Microsoft Excel spreadsheets from the agent.
Excel
Lets the agent read, write and manage the worksheets, cell ranges and tables of Excel files stored on OneDrive. It requires a Microsoft 365 connection configured in the workspace.
The Excel files have to be on OneDrive or SharePoint. Identify one by its ID (from a OneDrive action) or by its path on OneDrive (e.g. /Documents/spreadsheet.xlsx).
The available operations
When you add this tool, choose which operations the agent is allowed to perform.
List the worksheets
Returns every worksheet of an Excel file.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive (e.g. /Documents/spreadsheet.xlsx) |
*Give either the file ID or the file path — not both.
Add a worksheet
Creates a new worksheet in an Excel file.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Name | No | — | The new worksheet's name. Omitted, Excel assigns a default (Sheet4, for instance) |
*Give either the file ID or the file path.
Delete a worksheet
Removes a worksheet from an Excel file.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Worksheet ID | Yes | — | The ID or name of the worksheet to delete |
*Give either the file ID or the file path.
Read a range
Reads the values of a range of cells.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Worksheet ID | Yes | — | The worksheet's ID or name (e.g. Sheet1) |
| Address | Yes | — | The cell range's address (e.g. A1:D10, A1, A:C). Use usedRange to read the whole area that has data |
*Give either the file ID or the file path.
Update a range
Replaces the values of a range of cells with the ones you give.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Worksheet ID | Yes | — | The worksheet's ID or name |
| Address | Yes | — | The address of the range to update (e.g. A1:C3) |
| Values | Yes | — | A two-dimensional array of values (rows × columns). E.g. [["Name", "Age"], ["João", 30]] |
*Give either the file ID or the file path.
Clear a range
Removes the values from a range of cells.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Worksheet ID | Yes | — | The worksheet's ID or name |
| Address | Yes | — | The address of the range to clear (e.g. A1:D10) |
*Give either the file ID or the file path.
List the tables
Returns the formatted tables of one worksheet, or of the whole Excel file.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Worksheet ID | No | — | The worksheet's ID or name. Omitted, it lists the tables of the whole file |
*Give either the file ID or the file path.
List a table's rows
Returns the rows of a formatted table in an Excel file.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Table ID | Yes | — | The table's ID or name |
| Maximum results | No | — | How many rows to return at most |
| Skip | No | — | How many rows to skip (for paging) |
*Give either the file ID or the file path.
Add rows to a table
Inserts new rows into a formatted table.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Table ID | Yes | — | The table's ID or name |
| Values | Yes | — | The rows to add, as a two-dimensional array. E.g. [["João", 30, "SP"], ["Maria", 25, "RJ"]] |
| Position | No | — | The insertion index (zero-based). Omitted, the rows go at the end |
*Give either the file ID or the file path.
Delete a table row
Removes one row from a formatted table.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File ID | No* | — | The Excel file's ID on OneDrive |
| File path | No* | — | The file's path on OneDrive |
| Table ID | Yes | — | The table's ID or name |
| Row index | Yes | — | The index of the row to delete (zero-based) |
*Give either the file ID or the file path.