Lodol Docs

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

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
namestringYesName for the new worksheet.
drive_idstringYesThe 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

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
table_idstringYesThe table's ID (from the 'Create table' action).
rowsarrayYesThe rows to add, as a list of rows where each row is a list of cell values. For example, [["Ann", 30], ["Bob", 25]].
drive_idstringYesThe 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

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
worksheet_idstringYesThe worksheet's ID (from the 'Add worksheet' action).
range_addressstringYesThe cell range, for example A1:D10.
drive_idstringYesThe OneDrive drive ID (from the OneDrive 'List drives' action).

Response

{
  "cleared": true
}

Create table

Create a table from a range in a worksheet.

Parameters

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
worksheet_idstringYesThe worksheet's ID (from the 'Add worksheet' action).
table_namestringYesName for the new table.
addressstringYesThe cell range the table should cover, for example A1:D10.
drive_idstringYesThe OneDrive drive ID (from the OneDrive 'List drives' action).

Response

{
  "id": "table1",
  "name": "Table1"
}

Delete worksheet

Delete a worksheet from an Excel workbook.

Parameters

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
worksheet_idstringYesThe worksheet's ID (from the 'Add worksheet' action).
drive_idstringYesThe 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

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
worksheet_idstringYesThe worksheet's ID (from the 'Add worksheet' action).
range_addressstringYesThe cell range, for example A1:D10.
drive_idstringYesThe 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

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
drive_idstringYesThe OneDrive drive ID (from the OneDrive 'List drives' action).

Response

{
  "worksheets": [
    "Sheet1"
  ]
}

Rename worksheet

Rename an existing worksheet in an Excel workbook.

Parameters

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
worksheet_idstringYesThe worksheet's ID (from the 'Add worksheet' action).
new_namestringYesNew name for the worksheet.
drive_idstringYesThe 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

ParameterTypeRequiredDescription
item_idstringYesThe ID of the workbook file in OneDrive (from the OneDrive 'Create workbook' or 'List children' actions).
worksheet_idstringYesThe worksheet's ID (from the 'Add worksheet' action).
range_addressstringYesThe cell range, for example A1:D10.
valuesarrayYesThe values to write, as a list of rows where each row is a list of cell values. For example, [["Name", "Age"], ["Ann", 30]].
drive_idstringYesThe OneDrive drive ID (from the OneDrive 'List drives' action).

Response

{
  "values": [
    [
      "A1",
      "B1"
    ],
    [
      "A2",
      "B2"
    ]
  ]
}

On this page