How to compare two CSV files on Mac
Yesterday's export against today's, or a file against the copy that came back from review. Comparing two CSVs by eye, or with a generic diff, is less reliable than it looks.
Why comparing two exports isn't as simple as it looks
The obvious move is to open both files in a spreadsheet, sort them the same way, and look for what's different. Two problems get in the way immediately. First, row order: if the second export sorted differently, or a row moved up because an earlier one was deleted, a line-by-line comparison marks every row after that point as changed, even when nothing in it did. Second, precision: Excel keeps only 15 significant digits, so a 16-digit order number or card number already differs from itself the moment it's opened, its last digit turned to a zero before you've compared anything (Microsoft). A comparison built on a file that already changed under you isn't one you can trust.
Compare two files in Tabulay (Tabulay Pro, included in the 14-day trial)
- Open the first file in Tabulay.
- Data ▸ Compare With… (⌥⌘C), and choose the second file.
- Pick the column that identifies each row, an order ID or a transaction ID, so rows are matched by that key rather than by their position. Without a shared ID column, Tabulay can compare by position instead.
- Matching on a key means a row that moved, because an earlier row was inserted or removed, isn't treated as a change. Only what's actually different is.
What the comparison shows
- Rows added in the second file, rows removed from the first, and rows present in both but changed, with the before and after value for each field that differs.
- Columns that exist in only one of the two files.
- IDs that appear more than once in either file, flagged instead of silently matched to the wrong row.
Export the differences
Save the whole comparison as a CSV: added, removed and changed rows, and every changed field's before and after, in one file you can attach to a ticket, send to whoever ran the second export, or keep next to the originals as an audit trail.
The limits, stated plainly
Compare is one of Tabulay Pro's eight features (SQL, query plans, column insights, Transform, Remove Duplicates, Compare, Normalize, Excel workbooks), included in full for the 14-day trial and unlocked for good with a single purchase. Both files follow the same size rule as everything else in Tabulay: up to 2 GB open for editing, larger files open read-only.
Other ways to compare two CSV files
The command line has real tools for this: sort both files the same way and diff or comm them, which works cleanly once rows and formatting already line up, and falls apart the moment they don't. A spreadsheet can compare two files with a lookup formula written per row, matching each one on an ID column much like Tabulay does, which is workable for a file under its row limit and worth building once you know you'll run it again.
Try it
Open your two files and pick the ID column they share: that's the whole setup. The full list of what Compare and the rest of Tabulay Pro include is on the tech specs page. If the file you're comparing is also a large one, start with opening a large CSV file on Mac.