Pairing by key. Every row in each file is identified by its key, from one column or several. Rows whose keys match are paired, whatever their position in the file, and compared column by column. What remains after pairing are the rows that are missing from the other file.
Only in file A, only in file B. The table labels each leftover row with the file it came from, such as Only in contacts-old.csv, and gives its row number as a spreadsheet would show it. The filter shows just the rows only in file A, or just those only in file B. In the export they become the Deletions sheet (only in A) and the Additions sheet (only in B), with every column of the original row.
Keys compared sensibly. Keys are compared without regard to case or extra spaces, so inv-001 matches INV-001. Thousands separators and a trailing .0 are ignored, so 1,001 matches 1001, while leading zeros are kept, so 00123 stays distinct from 123. Dates used as keys are compared as calendar dates.
Duplicates counted, not hidden. A key that appears more than once in a file is listed as a duplicate key with every row number. Duplicates pair with the other file in order of appearance, and any extra occurrence is listed as only in its file and marked duplicate key, so a repeated record explains a gap in the totals.
Empty keys. A row with no key value is listed as only in its file and marked empty key, and it is never paired with anything. The Summary sheet counts them for each file.
Near-miss keys. For each unmatched row, LedgerPair looks for an unmatched key on the other side that is spelled almost the same and shows it as a fuzzy candidate in its own column. With a composite key, all parts but one must be equal before a candidate is suggested, so a shared date never makes unrelated keys look alike. Candidates are suggestions to check, never counted as matches, and the export gives each one’s row number and a similarity score.
The record. The Summary sheet opens the evidence workbook with the row count of each file; the matched, changed, addition, and deletion counts; duplicate keys and empty keys for each file; and the number of fuzzy candidates. The sheets behind it hold the rows themselves, with frozen headers and filters.