Comparing tables is common: yesterday’s export versus today’s, inventory before and after a change, or data from two different systems.
The main challenge is not displaying two files side by side. It is deciding which row in file A corresponds to which row in file B.
Choose a comparison key
A key is a column that identifies a record, such as a customer ID, SKU or internal reference.
The Excel and CSV Comparator uses this logic to match records. For CSV-only work, CSV Compare offers a focused alternative.
Row numbers are usually a poor key
If a new row is inserted near the top of file B, every later position changes. A line-by-line comparison would report many false differences even though most records are unchanged.
A stable business key lets you compare records independently of their order.
Added, removed and modified records
A useful comparison distinguishes at least three situations:
- a key exists only in the new file: added record;
- it exists only in the old file: removed record;
- it exists in both but other columns differ: modified record.
That distinction is much more informative than a simple “files are different” result.