Tablora

Tablora · Library

Understand trimmed header comparison

A repeated header written as " Name " with extra spaces still matches Name, because the cleaner trims cell edges before comparing rows.

Spaces that hide an exact match

When pages from a report are copied and joined, the repeated header on a later page can pick up padding: a space before Name, two after Amount, or a non-breaking space carried over from a PDF. On screen these rows look identical to the real header, but a strict character-by-character comparison would treat them as different and leave them in the data.

Repeated header cleanup trims whitespace at the start and end of each cell before it compares a row with the chosen header. Spaces inside a cell, such as between two words, are still compared exactly.

Edge spaces are a common side effect of copying text from a PDF or from a report aligned with spaces. Because the cleaner ignores them only for the comparison, you do not have to tidy the whole text before removing repeated headers.

Working through the padded header

In the page example the Header row is 1 and there are three source rows: Name and Amount, Paper and 12.50, and a third row with the header names surrounded by extra spaces. After Calculate, source row 3 is removed because, once the outer spaces are trimmed, every cell equals the chosen header. Removed header rows shows 1 and the output has 2 rows.

The retained rows are not rewritten. Trimming is used only for the comparison; the header and the Paper record keep their original characters in the preview and the download.

Steps for a padded repeat

Where trimming stops

Original synthetic example

Browser header row
1
Removed source rows
3
Output rows
2
Source rowFirst cellSecond cell
1NameAmount
2Paper12.50
3 Name Amount

Tools