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
| Parameter | Required | Description |
|---|---|---|
| Credential | Yes | The Microsoft OAuth credential used to access the file. |
| Path | Yes | The file path in OneDrive, for example /Documents/MySpreadsheet.xlsx. |
Outputs
| Variable | Type | Description |
|---|---|---|
Worksheets | array | One entry per worksheet, in workbook order. |
TotalCount | int | The total number of worksheets returned. |
| Field | Description |
|---|---|
Id | The Graph-assigned worksheet identifier. |
Name | The worksheet name (the tab label in Excel). |
Position | The zero-based index of the worksheet within the workbook. |
Visibility | The worksheet’s visibility state: Visible, Hidden, or VeryHidden. |
{{Steps.List_Worksheets.Worksheets}}.
Examples
1) Process every visible worksheet
- List Worksheets — produces an array of all worksheets.
- Filter step — keep only entries where
Visibility == "Visible". - Loop step — iterate over the filtered list and for each item:
- Read File with
Worksheet Nameset to{{Steps.Loop.CurrentItem.Name}} - …and downstream processing.
- Read File with
2) Check whether a worksheet exists before writing
- List Worksheets.
- Compare step — does
{{Steps.List_Worksheets.Worksheets}}contain an entry withName == "Today"?- If yes → Write Row to
Today. - If no → Add Worksheet named
Today, then Write Row.
- If yes → Write Row to
Notes and limitations
- Returns worksheets in workbook order. Reorder downstream if you need a different sort.
- Hidden worksheets are included — filter by
Visibilityif you only want visible tabs. - The step does not return cell data. Use Read File for values.
