Comparing two versions — Trusty CSV User Guide

A comparison shows what differs between the tab and another version of it: which cells changed, which rows were added and which were removed. It doesn’t open anything new: the differences are marked in the tab itself, where you can go on working, and the Changes panel at the right sums them up.

What to compare with

What is marked

Hover a changed cell to see what it was. F7 goes to the next change and selects it, and Shift + F7``⇧ F7 to the previous one; both go round the file.

What changed inside a cell

When a cell is still the same value with a change in it (a word of a sentence, a digit of a date, a letter of a name), the part that is new is tinted more strongly than the rest of the cell, and in the grey line under it the part that is gone is marked the same way. In The quick red fox, which was The quick brown fox, only red stands out, over brown.

When the other side isn’t older than the tab (the file on disk, another tab), the panel doesn’t say added and removed, but only here and only on disk (or only in the other tab).

How rows and columns are matched

Columns are matched by their names, so a column that was inserted, deleted or moved doesn’t make every row look different; the panel lists it. A column with another name in the same place is taken as renamed, and its values are compared. Without a header row, columns are matched by their place.

Rows are matched by their content, in the order they come: a row inserted in the middle doesn’t shift the rest. Between two rows that are the same in both versions, a row that shares at least half its values with a row of the other version is the same row, changed. Quotes don’t count: "Madrid" and Madrid are the same value.

If the rows are the same but in another order, as after a sort, the panel says so and marks nothing.

Rows in another order: match them by a column

Matched by their content, rows that moved look like rows removed in one place and added in another, and a row that moved and changed can’t be told from a new one. When the table has a column that names each row (an id, a code, an e-mail address), choose it in Match rows by, at the top of the Changes panel: the list has Their content, which is how every comparison starts, and every column that both versions have.

The panel proposes a column when it would help: if the rows turn out to be the same in another order, or most of them find no match, and a column has a different value in every row of both versions, a line under the figures says The rows may be in another order: match them by “id”. Click it to do so. The panel never changes how rows are matched by itself.

The choice lasts as long as the comparison, through every edit; a new comparison starts by content again. If you delete the column the rows are matched by, they go back to their content.

While you compare

The comparison follows the tab: a moment after you stop typing, it is made again with the text as it is then. The tab can still be edited, saved and undone as always. A comparison belongs to its tab, and isn’t kept when the page reloads.

The panel takes the place of the column profile, Row Details and the Quality Check; opening one of them hides it, without ending the comparison. Close it with its ×, or View › Compare With › Close Comparison, to take every mark away.

With very many differences, the grey lines under the rows are drawn for the first 5,000 changes, and a group of removed rows shows its first 200; the panel counts them all.