Microsoft Excel
API actions for the Microsoft Excel integration.
Microsoft Excel
Manage and edit Excel workbooks stored in OneDrive or SharePoint.
Add worksheet
Add a new worksheet to an Excel workbook.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
name | string | Yes | Name for the new worksheet. |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"id": "sheet2",
"name": "Sheet2"
}Append table rows
Append rows to an existing table in a worksheet.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
table_id | string | Yes | The table's ID (from the 'Create table' action). |
rows | array | Yes | The rows to add, as a list of rows where each row is a list of cell values. For example, [["Ann", 30], ["Bob", 25]]. |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"rows_added": 2
}Clear range
Clear the contents of a specified range in a worksheet.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
worksheet_id | string | Yes | The worksheet's ID (from the 'Add worksheet' action). |
range_address | string | Yes | The cell range, for example A1:D10. |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"cleared": true
}Create table
Create a table from a range in a worksheet.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
worksheet_id | string | Yes | The worksheet's ID (from the 'Add worksheet' action). |
table_name | string | Yes | Name for the new table. |
address | string | Yes | The cell range the table should cover, for example A1:D10. |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"id": "table1",
"name": "Table1"
}Delete worksheet
Delete a worksheet from an Excel workbook.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
worksheet_id | string | Yes | The worksheet's ID (from the 'Add worksheet' action). |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"deleted": true
}Get range values
Get the values from a specified range in a worksheet.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
worksheet_id | string | Yes | The worksheet's ID (from the 'Add worksheet' action). |
range_address | string | Yes | The cell range, for example A1:D10. |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"values": [
[
"A1",
"B1"
],
[
"A2",
"B2"
]
]
}List worksheets
List all worksheets in an Excel workbook.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"worksheets": [
"Sheet1"
]
}Rename worksheet
Rename an existing worksheet in an Excel workbook.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
worksheet_id | string | Yes | The worksheet's ID (from the 'Add worksheet' action). |
new_name | string | Yes | New name for the worksheet. |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"name": "RenamedSheet"
}Update range values
Update the values in a specified range in a worksheet.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions). |
worksheet_id | string | Yes | The worksheet's ID (from the 'Add worksheet' action). |
range_address | string | Yes | The cell range, for example A1:D10. |
values | array | Yes | The values to write, as a list of rows where each row is a list of cell values. For example, [["Name", "Age"], ["Ann", 30]]. |
drive_id | string | Yes | The OneDrive drive ID (from the OneDrive 'List drives' action). |
Response
{
"values": [
[
"A1",
"B1"
],
[
"A2",
"B2"
]
]
}