Lodol Docs

Microsoft Excel

API actions for the Microsoft Excel integration.

Microsoft Excel

Manage and edit Excel workbooks stored in OneDrive or SharePoint via Microsoft Graph.


Add worksheet

Add a new worksheet to an Excel workbook.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
namestringYesName for the new worksheet.
drive_idstringYesDrive ID from OneDrive list_drives.

Response

{
  "id": "sheet2",
  "name": "Sheet2"
}

Append table rows

Append rows to an existing table in a worksheet.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
table_idstringYesTable ID from create_table.
rowsarrayYes2D array of row values to append.
drive_idstringYesDrive ID from OneDrive list_drives.

Response

{
  "rows_added": 2
}

Clear range

Clear the contents of a specified range in a worksheet.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
worksheet_idstringYesWorksheet ID from add_worksheet.
range_addressstringYesThe range address (e.g., 'A1:D10').
drive_idstringYesDrive ID from OneDrive list_drives.

Response

{
  "cleared": true
}

Create table

Create a table from a range in a worksheet.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
worksheet_idstringYesWorksheet ID from add_worksheet.
table_namestringYesName for the new table.
addressstringYesThe range address for the table (e.g., 'A1:D10').
drive_idstringYesDrive ID from OneDrive list_drives.

Response

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

Delete worksheet

Delete a worksheet from an Excel workbook.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
worksheet_idstringYesWorksheet ID from add_worksheet.
drive_idstringYesDrive ID from OneDrive list_drives.

Response

{
  "deleted": true
}

Get range values

Get the values from a specified range in a worksheet.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
worksheet_idstringYesWorksheet ID from add_worksheet.
range_addressstringYesThe range address (e.g., 'A1:D10').
drive_idstringYesDrive ID from OneDrive list_drives.

Response

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

List worksheets

List all worksheets in an Excel workbook.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
drive_idstringYesDrive ID from OneDrive list_drives.

Response

{
  "worksheets": [
    "Sheet1"
  ]
}

Rename worksheet

Rename an existing worksheet in an Excel workbook.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
worksheet_idstringYesWorksheet ID from add_worksheet.
new_namestringYesNew name for the worksheet.
drive_idstringYesDrive ID from OneDrive list_drives.

Response

{
  "name": "RenamedSheet"
}

Update range values

Update the values in a specified range in a worksheet.

Parameters

ParameterTypeRequiredDescription
item_idstringYesWorkbook item ID from OneDrive (e.g., from create_workbook or list_children).
worksheet_idstringYesWorksheet ID from add_worksheet.
range_addressstringYesThe range address (e.g., 'A1:D10').
valuesarrayYes2D array of values to set.
drive_idstringYesDrive ID from OneDrive list_drives.

Response

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

On this page