Flatten a Table into a Plain Range
A 6-step recipe with Microsoft Excel. We can help you get access.
Recipe · 6 steps
Flatten a Table into a Plain Range
with Microsoft Excel
Archive a table by snapshotting it and flattening it into static cells.
- Open a persisting session so the conversion is committed to the stored workbook.
- Resolve the table on the worksheet that is about to be flattened.
- Capture the column schema before conversion. Once the table becomes a range these column names and ids no longer exist anywhere in the API.
- Capture every row before conversion so the caller holds a complete record of the table as a structured object.
- Convert the table into a plain range. This is irreversible through the API: the table object, its filters, and its sort are all discarded, and Excel returns the range the cells now occupy.
- Read the flattened cells back at the address the conversion reported to confirm the values survived the conversion intact.
What you'll need to have ready
- itemId: The drive item id of the workbook file.
- worksheetIdOrName: The worksheet holding the table to flatten.
For your developer
Arazzo workflow microsoft-excel:convert-table-to-range, 6 operations: createWorkbookSession → listTables → listTableColumns → listTableRows → convertTableToRange → getRange. Specs on APIs.io.