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
- Paste the joined text into Table text and select the Delimiter.
- Enter the position of the true header in Header row, counting from 1.
- Press Calculate and compare Removed header rows with the number of page breaks you expect in the source.
- If a header-like row remains, check its spelling and letter case, not its spaces; those are the differences the cleaner does not ignore.
- Keep your original text until you have checked the result.
Where trimming stops
- A row with different internal spacing, such as Unit price with two spaces against Unit price with one, does not match.
- Different letter case still counts, so NAME is not Name.
- A row with an extra empty cell at the end has a different width and is not removed.
- Trimming applies to the comparison only; if you want padded cells cleaned in your data, do that in the spreadsheet as a separate step.
- In the Tablora app, Merge pages also trims outer spaces when it checks whether a later page starts with the same header, and it ignores letter case as well.
Original synthetic example
- Browser header row
- 1
- Removed source rows
- 3
- Output rows
- 2
| Source row | First cell | Second cell |
|---|---|---|
| 1 | Name | Amount |
| 2 | Paper | 12.50 |
| 3 | Name | Amount |