Read Used Range
ms_excel.get_used_range
ActionFiles & storageconnection required
Calls the Microsoft Excel API with the connection's credentials.
Read the whole populated area of a worksheet, without needing to know how far the data goes.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Microsoft Excel
- Secret shape
- {"client_id": "…", "client_secret": "…", "refresh_token": "…"} with the Files.ReadWrite delegated scope
- Config it needs
- tenant, drive_id, site_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
7 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
drive_id The drive holding the workbook. Leave blank for the connected user's own OneDrive (/me/drive). Ignored when site_id is set. | string | No | — | — | — |
site_id A SharePoint site id when the workbook lives in that site's document library, as 'hostname,siteCollectionId,siteId'. Takes precedence over drive_id. | string | No | — | — | — |
item_id The workbook file's driveItem id, addressing it as /items/{item-id}. Takes precedence over item_path when both are set. | string | No | — | — | — |
item_path The workbook's path inside the drive, e.g. 'Reports/Q3.xlsx', addressing it as /root:/Reports/Q3.xlsx:. Used when item_id is blank. | string | No | — | — | — |
worksheet The worksheet's name or id, e.g. 'Sheet1'. | string | Yes | — | — | — |
values_only Narrow the used range to cells that hold values, ignoring cells that only carry formatting. | boolean | No | false | — | — |
session_id A workbook session id from ms_excel.create_session, sent as the workbook-session-id header. Leave blank to let Excel treat the call as a one-off persisted change. | string | No | — | — | — |
- At least one of item_id, item_path must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"values_only": false
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
address The range address Excel resolved, e.g. 'Sheet1!A1:D10'. | string | — |
values The cell values as a row-major two-dimensional array. | array | — |
text The displayed text of each cell, as a two-dimensional array. | array | — |
formulas The cell formulas, as a two-dimensional array. | array | — |
row_count How many rows the range covers. | number | — |
column_count How many columns the range covers. | number | — |
{
"address": "",
"column_count": 0,
"formulas": [],
"row_count": 0,
"text": [],
"values": []
}See Read Used Range run in a workflow.
In a technical demo we add the Microsoft Excel connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.