Skip to main content

Documentation Index

Fetch the complete documentation index at: https://explore.airia.com/llms.txt

Use this file to discover all available pages before exploring further.

The Excel — Read File step reads the used range of one or more worksheets from an Excel file in OneDrive or SharePoint. Use it whenever an agent needs the actual cell values from a spreadsheet — to feed an AI model, drive downstream branching, or transform the data. For converting a whole document to markdown text (PDF, Word, Excel, etc.), use the MarkItDown step instead.

How it works

The step uses the Microsoft Graph API to read the used range of each requested worksheet — the rectangular region from A1 to the last cell that contains data. Empty trailing rows and columns are not returned. To keep payloads predictable, the step caps the number of rows and columns it reads. When a worksheet exceeds the cap, the response is truncated and flagged so downstream steps can handle the partial result gracefully.

Prerequisites

  • The OneDrive Excel steps must be enabled on your workspace (feature flag: step-sdk-onedrive-excel).
  • A Microsoft OAuth credential with at least read access to the file.
  • The Excel file already exists at the configured Path.

Inputs

ParameterRequiredDescription
CredentialYesThe Microsoft OAuth credential used to access the file.
PathYesThe file path in OneDrive, for example /Documents/MySpreadsheet.xlsx.
Worksheet NameNoThe worksheet to read. Leave empty to read every worksheet in the file.
Max RowsNoThe maximum number of rows to read per worksheet. Defaults to 1000. Range: 1–100,000.
Max ColumnsNoThe maximum number of columns to read per worksheet. Defaults to 100. Range: 1–16,384.

Outputs

VariableTypeDescription
WorksheetsarrayOne entry per worksheet read. Each entry includes Id, Name, and a UsedRange object.
TotalCountintThe total number of worksheets returned.
WasTruncatedbooltrue when at least one worksheet exceeded the Max Rows / Max Columns caps.
TruncationMessagestring | nullA human-readable description of what was truncated, when WasTruncated is true.
Each worksheet entry exposes:
FieldDescription
IdThe Graph-assigned worksheet identifier.
NameThe worksheet name (the tab label in Excel).
UsedRange.AddressThe range that was read, for example A1:D250.
UsedRange.RowCountThe number of rows in the used range.
UsedRange.ColumnCountThe number of columns in the used range.
UsedRange.ValuesA 2D array of cell values, row-major. Cell values may be strings, numbers, booleans, or null.
Reference the data with standard expression syntax, for example:
  • {{Steps.Read_File.Worksheets[0].UsedRange.Values}}
  • {{Steps.Read_File.WasTruncated}}

Examples

1) Read a specific worksheet

  • Path: /Reports/Quarterly Summary.xlsx
  • Worksheet Name: Q1
  • Max Rows: 500
Then pass {{Steps.Read_File.Worksheets[0].UsedRange.Values}} into an AI model prompt for analysis.

2) Read every worksheet in a file

  • Path: /Imports/Customers.xlsx
  • Worksheet Name: (leave empty)
Use a Loop step to iterate over {{Steps.Read_File.Worksheets}} and process each one.

3) Guard against truncation

Branch downstream:
  • If {{Steps.Read_File.WasTruncated}} is true → take a fallback path (warn the user, log the truncation, or split the file).
  • Else → continue with the full dataset.

Notes and limitations

  • Used range only. Cells with formatting but no value are still considered empty and are not included in the used range.
  • Hidden worksheets are returned along with visible ones. Filter on the worksheet name if you need to exclude them.
  • Pivot tables and charts are not exported — only cell values from the underlying range.
  • Formulas return their cached value, not the formula text.
  • Bulk reads have a soft Graph limit. If you regularly exceed it, lower the caps and read worksheets one at a time.