A merged HTML table cell is not a missing value
You copy a public table into a spreadsheet. The second row starts with “Children” where the branch name should be, and its numbers slide one column to the left. Before repairing the spreadsheet, check whether the webpage used a single branch cell across both rows.
For an HTML table, reconstruct the occupied grid and the headers attached to each value before treating the output as records. A cell carried across rows is different from an empty cell. The distinction can change which place, year or population a number describes.

Follow one number through a small table
This library table is invented for the exercise. “North” covers two audience rows. “Loans” covers two year columns. The values count loans, not visitors.
| Branch | Audience | Loans | |
|---|---|---|---|
| 2025 | 2026 | ||
| North | Adults | 120 | 150 |
| Children | 80 | 95 | |
The complete meaning of 95 is “North branch, children, loans, 2026.” Exporting only “Children, 80, 95” loses a label. Exporting “North, Children, 80, 95” under columns called “Branch, Audience, 2025, 2026” still drops the measure unless “loans” is retained in the column names or accompanying schema.
Here is a useful long-form export. Each row represents one branch–audience–year observation:
branch,audience,measure,year,value
North,Adults,loans,2025,120
North,Adults,loans,2026,150
North,Children,loans,2025,80
North,Children,loans,2026,95
There are two audience rows in the source and four observations in this export. Neither count is wrong; they count different units. Define your unit before reporting a total.
Read the structure that survives the copy
In HTML, rowspan and colspan describe how many grid positions a cell occupies vertically and horizontally. The HTML table model therefore does not equate a cell’s position in a row’s markup with its displayed column: earlier spanning cells may already occupy slots.
For the second audience row above, the branch position is occupied by the preceding “North” cell. A routine that simply collects each row’s cell text sees fewer cells there. That is a reason to inspect the structure, not evidence that the branch is unknown.
Use your browser’s element inspector on the actual table. Look for th and td cells and their span attributes. Save the relevant table HTML alongside a screenshot, URL and retrieval time. For a dynamically loaded table, preserve the loaded table and its active filters; an initial page download may not contain the displayed rows.
W3C’s irregular-header guide explains row and column groups. For more complex layouts, the multi-level header guide shows explicit associations: a data cell’s headers attribute refers to header-cell IDs. Check those associations when present, then compare them with the visible labels. Published markup can itself be incomplete or mistaken.
Expand labels without inventing observations
- Map the grid. Mark every position occupied by each spanning cell. When processing the next row, place its first new cell in the first unoccupied position. Keep the original source cell attached to every position it covers.
- Build the full header path. For each value, collect its row identity, measure, unit and all relevant column levels. Repeated “Total” headers need their parent group to become meaningful.
- Choose the output unit. The exercise uses one observation per branch, audience and year. A wide export can instead retain one row per branch and audience, with clearly named year columns.
- Reconcile the result. Trace the first, last and a span-crossing value back to the page. Here, check 120, 95 and the inherited North label. Account for every source value once.
Do not apply “fill down” to all blank spreadsheet cells. An actual empty cell, a dash explained by a footnote and a position occupied by a span are three different cases. Retain the source’s missing-value notation until you know its meaning.
Also distinguish a shared label from a shared number. If a single numeric cell spans two audience columns and represents a combined total, copying that total into both groups would manufacture two observations. Keep it as a combined value unless the source supplies a valid allocation. Check captions and footnotes before splitting anything.
Leave a reconstruction another reader can challenge
Keep the original table, the export and a short mapping note together: “North inherited from the source cell spanning two audience rows; Loans + year combined into each observation’s measure and year fields.” Record any unresolved header or merged total explicitly. A tidy rectangular file is not proof that the interpretation is correct.
Try reconstructing the children’s two observations by hand before trusting an automated extractor. If the resulting file then enters a larger investigation, use the evidence-report workflow to preserve the source-to-finding trail. When you join those records to another table, separately check whether the join multiplies the observations.
Author: OSINT Jet · Primary sources reviewed 5 December 2026
