Get table range
Return the address of the smallest rectangle holding all data on the sheet (including pivot tables), or of a named Excel table or pivot table, e.g. A1:D20.
Command in the Excel toolkit · id ooa.excel/get_table_range · 5 inputs, 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Sheet | String | No | Sheet name; active sheet when empty. | |
| Session | String | No | excel | Workbook session. |
| Table | String | No | Excel table or pivot table name, e.g. Table1 or PivotTable1; the sheet's used area when empty. | |
| Include header | Boolean | No | true | For an Excel table, include its header row in the range. |
| Include pivot tables | Boolean | No | true | Count the whole area of the sheet's pivot tables (with their filter fields) as data, even cells Excel has not filled in yet. |
Outputs
| Output | Type | What it is |
|---|---|---|
| range | String | Used range address; empty when the sheet is empty. |
| rows | Number | Number of rows in the range. |
| columns | Number | Number of columns in the range. |