Skip to content

Microsoft 365 Excel

This module allows working with Excel files stored in OneDrive via Microsoft Graph API. Available operations:

  • List Excel files: Searches all .xlsx files in user’s OneDrive.
  • List sheets: Gets the worksheets of an Excel file.
  • Read range: Reads data from a specific range in A1 notation (e.g.: A1:D10). Returns values, text and formulas.
  • Read as objects: Reads data using the first row as headers and returns an array of JSON objects, ideal for data processing.
  • Write range: Writes data to a range. Accepts 2D arrays, object arrays (automatically converted with headers) or JSON strings.
  • Add sheet: Creates a new sheet in the file.
  • Delete sheet: Deletes an existing sheet.
  • Get used range: Gets the range of cells with data.
  • Clear range: Clears content and format from a range.
ParameterTypeRequiredDescription
credentials_idcredentialsYesConfigured Microsoft OAuth account
fileIdstringYesExcel file ID in OneDrive
operationselectYesOperation to perform
ParameterTypeRequiredDescription
sheetNamestringYesSheet name (default: Sheet1)
rangestringYesRange in A1 notation (default: A1:Z100)
outputKeystringNoOutput key (default: data / rows)
ParameterTypeRequiredDescription
sheetNamestringYesSheet name
rangestringYesStart range where to write (e.g.: A1)
valuesKeystringNoKey in data with values (default: values)
ParameterTypeRequiredDescription
sheetNamestringYesNew sheet name

Requires Microsoft OAuth2 type credentials with:

  • Scopes: Files.ReadWrite, Files.ReadWrite.All
  • The module manages token refresh automatically
{
"nextModule": "siguiente_modulo",
"data": {
"rows": [
{ "_rowIndex": 2, "Nombre": "Juan", "Email": "juan@test.com", "Total": 150 },
{ "_rowIndex": 3, "Nombre": "Maria", "Email": "maria@test.com", "Total": 200 }
]
},
"_meta_": { "operation": "readRangeAsObjects", "microsoftService": "excel", "fileId": "abc123" }
}
{
"credentials_id": "mi-cuenta-ms365",
"fileId": "ABC123DEF456",
"operation": "readRangeAsObjects",
"sheetName": "Ventas",
"range": "A1:E50"
}
  • Microsoft Graph API - Excel workbook endpoints (/me/drive/items/{id}/workbook/worksheets)
  • When using “Read as objects”, the first row is used as headers
  • The _rowIndex field in the output indicates the actual row in Excel (starting from 2)
  • When writing, if an object array is passed, it is automatically converted to tabular format with headers
  • The write range is automatically calculated based on data dimensions
  • Sheet names with special characters are automatically encoded