CSV and spreadsheet guides
Ten how-to guides on problems that come up when you work with CSV files. Each one explains the cause, gives a method that works without buying anything, and shows tested code with its real output. See how these guides are made.
- How to compare two CSV files and see exactly what changed
Match rows by an ID, then list what was added, removed or changed. - How to find rows in one CSV file that are missing from another
Which customers are not on the list? A set difference done safely. - How to remove duplicate rows from a CSV file: five ways
Excel, Sheets, LibreOffice, command line and Python, with the pitfalls. - How to remove duplicate rows from a CSV by one column (keep the first or the last)
Keep the first or last row per email, with a record of what was removed. - How to see which rows Remove Duplicates deletes, and keep a copy
Excel's Remove Duplicates will not tell you what it deleted. Flag first. - Why Excel removes leading zeros from a CSV file, and how to keep them
ZIP codes, phone numbers and long IDs lose digits. Find them before opening. - How to open a semicolon-delimited CSV file in Excel (or convert it to commas)
Everything in column A? The separator depends on regional settings. - Why accented letters look garbled when you open a CSV in Excel (and the fix)
Café showing as Café: UTF-8 read as the wrong encoding. - How to split a CSV that is too big for Excel (the 1,048,576-row limit)
Split by records, not lines, and repeat the header in every piece. - How to make a CSV file safe to open in Excel (CSV formula injection)
Cells starting with = + - @ can run as formulas. The standard defence.