Docs
Browse Docs
Field guide · Structure and layout

Merged and multi-row headers

The column names are spread over two or more rows, often with merged cells, so no single row names every column.

What it looks like

Before
column Acolumn Bcolumn C
·sales 2024·
regionq1q2
North12095
After
column Acolumn Bcolumn C
regionsales_2024_q1sales_2024_q2
North12095
Columns are shown by position because the sheet has no usable header yet. The banner sat in a cell merged across B and C; it is folded into both names, and the single combined row becomes the header.

How it happens

  • The sheet was laid out as a report for people to read, with a banner heading over groups of columns.
  • Cells were merged for appearance, which leaves every cell but the first one empty.
  • A title, a date, or a logo row sits above the real header.

What it breaks

  • Software takes the first row as the header, so columns are named after a banner or left unnamed.
  • The second header row is read as data, which turns numeric columns into text.
  • Columns under a merged heading lose it, and two columns both called q1 cannot be told apart.

How to spot it

  • Look at the first few rows for merged cells, empty header cells, and repeated names.
  • Check whether the first row of data holds labels instead of values.
  • After importing, look for columns with generated names or numbers where names should be.

How to fix it

  • Fill each merged heading across the columns it covered.
  • Combine the header rows into one name per column, joining the levels in a consistent order.
  • Remove title and decoration rows from the table, and keep what they said, such as the reporting period, in a column or in the file's documentation.
  • Check that every resulting name is unique.

TermsHeader, Schema, Tidy data, Tabular data

Karg checks for many of these when it profiles a file, applies the fixes it is confident about, and sets the rest aside for your review. See how it works, or have our team clean your data for you.