get-excel-used-range
Identify the smallest range containing all populated cells in an Excel worksheet, returning its address, values, and formulas. Avoid guessing data extent when reading or appending.
Instructions
Invoke function usedRange
💡 TIP: Get the smallest range that encompasses any cells with values or formatting on the worksheet. Returns address, values, formulas, numberFormat, rowCount, columnCount. Use this to discover the populated bounds of a sheet before reading or appending — avoids guessing how far data extends. Optional $select to trim the response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| driveId | Yes | Path parameter: driveId | |
| driveItemId | Yes | Path parameter: driveItemId | |
| workbookWorksheetId | Yes | Path parameter: workbookWorksheetId | |
| fetchAllPages | No | Follow @odata.nextLink and merge up to 100 pages into one response. Can return enormous payloads—only when the user explicitly needs a full export. Prefer a small $top first, then paginate or narrow with $filter/$search. | |
| includeHeaders | No | Include response headers (including ETag) in the response metadata | |
| excludeResponse | No | Exclude the full response body and only return success or failure indication |