capabilities.work

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

Archive a table by snapshotting it and flattening it into static cells.

  1. Open a persisting session so the conversion is committed to the stored workbook.
  2. Resolve the table on the worksheet that is about to be flattened.
  3. Capture the column schema before conversion. Once the table becomes a range these column names and ids no longer exist anywhere in the API.
  4. Capture every row before conversion so the caller holds a complete record of the table as a structured object.
  5. 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.
  6. 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.