A merged table cell can cover several logical rows or columns, so a flat list of cell values is not enough to reconstruct the table. Use the returned indices and span information before exporting Document Intelligence results into a rectangular destination.
This guide focuses on Layout analysis and an application-side reconstruction decision. It does not claim that every complex table will be detected perfectly. Use a harmless sample with known expected structure and inspect the actual response from the API version your application uses.
Separate recognized cells from the display grid
A table can contain fewer detected cell objects than a simple rows-times-columns calculation suggests because one cell spans several positions. Treat that as a structural possibility before deciding the OCR omitted values.
Microsoft's Layout model documentation describes table dimensions, cell positions and row and column spans. It also notes that output representation can differ by API version. Inspect the structured result rather than flattening the top-level text into a CSV immediately.
Use a sample with a meaningful merged header
Choose a two-level heading where one parent label covers several columns. Give the lower headings distinct names. This exposes an exporter that shifts values or duplicates the wrong label while still producing a superficially tidy spreadsheet.
Distinguish text offsets from cell coordinates
A text span points into the response's textual content. A row or column span describes the cell's coverage in the table grid. Similar terminology does not make these values interchangeable. Keep their types and purposes explicit in the data mapping.
Build the grid from the response structure
Use row and column indices to place each detected cell, then apply its coverage according to the returned span fields and documented defaults. Do not assume the array order alone represents left-to-right row order.
The official Document Intelligence connector schema provides definitions for table-cell fields, including rowSpan and columnSpan in its documented response types. If you use that connector, verify the action's actual version and output schema rather than copying a REST property path blindly.
| Information | Role in reconstruction |
|---|---|
| Row and column indices | Cell's logical starting position |
| Row or column span | How many grid positions it covers |
| Content or referenced text | What the cell says |
| Header role | How the label may relate to data below it |

Choose a flattening policy explicitly
A merged header does not have one universally correct CSV representation. You might combine parent and child labels, retain a separate header map or use a format that preserves merged structure. Agree the destination contract with the data consumer before filling every covered position with repeated text.
Do not invent missing data values
An empty covered position may be part of a merged cell, a genuinely blank cell or a recognition error. Use the structure and source image to distinguish them. Copying the previous row's amount into every blank can create false business data.
Review totals and repeated headers
A page break can introduce another header row or a subtotal. These may resemble ordinary data rows after flattening. Define how the application recognizes and preserves their role, and route ambiguous cases to review rather than silently adding them to line-item totals.
Compare the export with a known answer
For the test table, check every header-to-value relationship and the expected number of data rows. Include at least one merged row header and one merged column header if both occur in the real workflow. A correct total cell alone does not validate the mapping.
Inspect the exported result through the destination application's own viewer. A file successfully written to storage can still contain shifted columns or text repeated into the wrong positions.
Our SharePoint metadata guide helps distinguish document-level descriptors from extracted table records when designing the destination. Keep the source document reference with the accepted extraction where the process requires traceability.
Have the data consumer review the sample export, because the chosen header representation affects how later calculations interpret columns.
Structured table cells and selection marks require different mappings. The related interpretation guide is Document Intelligence Checkbox States vs Answers.
Record the API or connector version, structural fields used and chosen flattening rule. The goal is a repeatable interpretation that preserves the table's meaning, with explicit handling of uncertainty rather than a visually plausible grid built from array order alone.

