Overview
Add Microsoft Excel to any ModuleX agent or workflow. Read, write, and manage Excel workbooks stored in OneDrive via the Microsoft Graph REST API (graph.microsoft.com/v1.0).
Categories : Productivity & Collaboration · Spreadsheets · Auth : Microsoft OAuth 2.0 · Actions : 9
Authentication
Microsoft OAuth 2.0
Connect to Microsoft Excel via Microsoft Identity Platform OAuth (recommended). Requires consent to access OneDrive files.
Required Credentials
Field Description Required Format Client ID Microsoft Entra ID (Azure AD) application Client ID. Yes 00000000-0000-0000-0000-000000000000Client Secret Microsoft Entra ID application Client Secret value. Yes xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OAuth Configuration
Authorization URL : https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Token URL : https://login.microsoftonline.com/common/oauth2/v2.0/token
Scopes : Files.ReadWrite, User.Read, offline_access
Available Actions
add_a_worksheet_tablerow — Adds rows to the end of a specific Excel table. Provide either tableId or tableName.
Parameters Drive item ID of the workbook (the spreadsheet file) in OneDrive.
Two-dimensional array of unformatted row values, e.g. [[1, 2, 3], [4, 5, 6]]. Each inner array is one row.
ID of the workbook table to append to. Provide either table_id or table_name.
Name of the workbook table (set in the Table Design tab). Used when table_id is not available, e.g. for personal accounts.
Response {
"$defs" : {
"TableRow" : {
"additionalProperties" : false ,
"description" : "One Microsoft Graph workbookTableRow returned by table operations." ,
"properties" : {
"index" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Index"
},
"values" : {
"items" : {
"items" : {},
"type" : "array"
},
"title" : "Values" ,
"type" : "array"
}
},
"title" : "TableRow" ,
"type" : "object"
}
},
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"row" : {
"anyOf" : [
{
"$ref" : "#/$defs/TableRow"
},
{
"type" : "null"
}
],
"default" : null
}
},
"required" : [
"success"
],
"title" : "AddAWorksheetTablerowOutput" ,
"type" : "object"
}
add_row — Insert a new row at the end of the used range of an Excel worksheet.
Parameters Drive item ID of the workbook in OneDrive.
Name of the worksheet to append the row to.
Array of cell values for the new row, e.g. [1, 2, 3]. Each item is one cell.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"address" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Address"
},
"values" : {
"items" : {
"items" : {},
"type" : "array"
},
"title" : "Values" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "AddRowOutput" ,
"type" : "object"
}
find_row — Find the first row in an Excel worksheet where the given column contains the given value.
Parameters Drive item ID of the workbook in OneDrive.
Name of the worksheet to search.
Column letter to search, e.g. ‘A’.
Value to search for. Numeric strings will also be matched as numbers.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"found" : {
"default" : false ,
"title" : "Found" ,
"type" : "boolean"
},
"row_number" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Row Number"
},
"address" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Address"
},
"values" : {
"items" : {
"items" : {},
"type" : "array"
},
"title" : "Values" ,
"type" : "array"
},
"column_values" : {
"items" : {},
"title" : "Column Values" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "FindRowOutput" ,
"type" : "object"
}
get_columns — Get all values in the requested columns of an Excel worksheet's used range.
Parameters Drive item ID of the workbook in OneDrive.
Name of the worksheet to read.
Array of column letters to retrieve, e.g. [‘A’, ‘C’].
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"values" : {
"additionalProperties" : {
"items" : {},
"type" : "array"
},
"title" : "Values" ,
"type" : "object"
}
},
"required" : [
"success"
],
"title" : "GetColumnsOutput" ,
"type" : "object"
}
get_spreadsheet — Get the values of the specified range (or the entire used range) of an Excel worksheet.
Parameters Drive item ID of the workbook in OneDrive.
Name of the worksheet to read.
Range within the worksheet, e.g. ‘A1:C4’. If omitted, the entire used range is returned.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"address" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Address"
},
"row_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Row Count"
},
"column_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Column Count"
},
"values" : {
"items" : {
"items" : {},
"type" : "array"
},
"title" : "Values" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "GetSpreadsheetOutput" ,
"type" : "object"
}
get_table_rows — Retrieve all rows from a specified table in an Excel worksheet.
Parameters Drive item ID of the workbook in OneDrive.
ID of the workbook table whose rows you want.
Response {
"$defs" : {
"TableRow" : {
"additionalProperties" : false ,
"description" : "One Microsoft Graph workbookTableRow returned by table operations." ,
"properties" : {
"index" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Index"
},
"values" : {
"items" : {
"items" : {},
"type" : "array"
},
"title" : "Values" ,
"type" : "array"
}
},
"title" : "TableRow" ,
"type" : "object"
}
},
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"rows" : {
"items" : {
"$ref" : "#/$defs/TableRow"
},
"title" : "Rows" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "GetTableRowsOutput" ,
"type" : "object"
}
list_folder_id_options — List OneDrive folders the user can browse to pick a workbook location. Returns label/value pairs suitable for a folder picker.
Parameters Maximum number of batch pages to fetch (1-500). Default 50.
Response {
"$defs" : {
"FolderOption" : {
"additionalProperties" : false ,
"description" : "One folder option returned by list_folder_id_options." ,
"properties" : {
"value" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Value"
},
"label" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Label"
}
},
"title" : "FolderOption" ,
"type" : "object"
}
},
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"options" : {
"items" : {
"$ref" : "#/$defs/FolderOption"
},
"title" : "Options" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "ListFolderIdOptionsOutput" ,
"type" : "object"
}
update_cell — Update the value of a specific cell in an Excel worksheet.
Parameters Drive item ID of the workbook in OneDrive.
Name of the worksheet containing the cell.
Cell address to update, e.g. ‘A1’.
Value to write to the cell.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"address" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Address"
},
"values" : {
"items" : {
"items" : {},
"type" : "array"
},
"title" : "Values" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "UpdateCellOutput" ,
"type" : "object"
}
update_worksheet_tablerow — Update the values of an existing row in an Excel workbook table (work or school accounts only).
Parameters Drive item ID of the workbook in OneDrive.
ID of the workbook table.
Zero-based index of the row to update.
Array of cell values for the updated row, e.g. [1, 2, 3]. Each item is one cell.
Response {
"$defs" : {
"TableRow" : {
"additionalProperties" : false ,
"description" : "One Microsoft Graph workbookTableRow returned by table operations." ,
"properties" : {
"index" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Index"
},
"values" : {
"items" : {
"items" : {},
"type" : "array"
},
"title" : "Values" ,
"type" : "array"
}
},
"title" : "TableRow" ,
"type" : "object"
}
},
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"row" : {
"anyOf" : [
{
"$ref" : "#/$defs/TableRow"
},
{
"type" : "null"
}
],
"default" : null
}
},
"required" : [
"success"
],
"title" : "UpdateWorksheetTablerowOutput" ,
"type" : "object"
}
Limits & Quotas
Microsoft Graph throttling : Graph applies per-app and per-user
throttling. Excessive requests return HTTP 429 with a
Retry-After header. See
https://learn.microsoft.com/en-us/graph/throttling for current
limits.
Workbook session limits : Excel workbook APIs apply additional
per-workbook session throttling; consider batching writes via
add_a_worksheet_tablerow rather than per-cell update_cell calls
when possible.
Table updates (update_worksheet_tablerow): work or school
Microsoft accounts only. Personal accounts cannot enumerate or
update workbook tables.
Error model : non-2xx responses and timeouts are caught and
returned as success=False + error rather than raising. Plan for
retries on the agent side based on the error string.
Links