Tablora

Tablora · Library

Locate a row with fewer fields

When a row has fewer fields than the header, as in a,b,c over 1,2, the inspector flags it. Find out why before you pad or delete anything.

What a width warning measures

Every row in a well-formed table has the same number of fields as its header. When one does not, the inspector counts it under Rows with a different width. That count compares each row with the first row and nothing else. It cannot tell whether a value is missing from the record, the header has an extra column, or the wrong delimiter was chosen for the whole text.

Each of those causes needs a different repair, and the wrong one moves data into the wrong column.

The Columns figure in the summary is the width of the widest row, so a row with too many fields raises it above the header's width. When Columns is larger than the number of header fields, look for a value that was split.

Reading a,b,c over 1,2

The page example is a header a,b,c and a record 1,2, with comma as the Delimiter. The inspector reports 2 rows, 3 columns and 1 row with a different width: row 2 has 2 cells instead of 3. Columns reports the widest row, which here is the header.

The preview shows the row as it was parsed, with nothing added. Which of the three positions is missing is not something the tool can know: 1,2 could be a and b with c empty, or b and c with a missing.

Tracing the cause

Repairs to avoid

Original synthetic example

Input
a,b,c 1,2
Delimiter
,
Expected records
2
Columns in the first record
3
Width difference
Row 2 has 2 cells

Tools

Sources