Assay guide

Why Excel removes leading zeros from your CSV — and how to stop it

Open a CSV in Excel and 02134 becomes 2134, a 16-digit account number ends in zeros, and “3-4” becomes 4 March. The CSV was fine; opening it is what changes it. Assay shows you every value Excel would change, for free, and converts the file so Excel cannot.

What it's for

A CSV file stores everything as plain text. When Excel (or Numbers) opens one, it guesses what each value is: anything that looks like a number loses its leading zeros, numbers longer than 15 digits are rounded, and values like 3-4 or MAR1 become dates. Save the file and the damage is permanent.

Open the CSV in Assay first. The inspector's If you open this in Excel section counts exactly which values would change, in which columns, with examples — free, before anything is touched.

Then convert it to an Excel Workbook (.xlsx). Assay stores every value exactly as it is, as text where it needs to be, so Excel opens it without changing anything.

How to use it

  1. Get Assay

    Download Assay from the Mac App Store. It is free.

  2. Open the CSV

    Drag it onto Assay's window or choose File › Open… (⌘O). The table opens as it really is, leading zeros included.

  3. See what Excel would change

    Choose View › Show Info (⌘I). The If you open this in Excel section lists the values that would lose leading zeros, be rounded, become dates or run as formulas.

  4. Convert to an Excel Workbook

    Click Convert to Excel Workbook in that section, or pick Excel Workbook in the bar at the bottom, then Convert…. Assay checks the .xlsx against the CSV before it says nothing was lost.

What Excel changes when it opens a CSV

  • Leading zeros — ZIP and postal codes, product codes, phone numbers, employee IDs
  • Long numbers — anything over 15 digits, like card or account numbers, is rounded
  • Things that look like dates — gene names, part numbers, scores like 3-4
  • Formulas — a cell starting with = runs when the file opens

Seeing the risks is free in Assay. Converting to .xlsx is part of Assay Unlock, a one-time purchase with no subscription.

Common questions

Can't I just use Excel's import wizard?

You can, column by column, every time — and one missed column loses the zeros. A converted .xlsx keeps them for whoever opens it next, without a wizard.

Does Assay change my CSV?

No. The CSV is never modified. The workbook is a new file.

Does this work with TSV and other tables?

Yes. The Excel check covers CSV and TSV, and Assay converts between CSV, TSV, Excel, SQLite, JSON and many older spreadsheet formats.

Try it on your own files

Assay is free on the Mac App Store — no subscription, no account, and nothing leaves your Mac. Requires macOS 14+.