My leading zeros disappeared when I saved Excel as CSV
Leading zeros gone after saving as CSV, but the loss might not be in the save step at all. Here's the two-stage way Excel actually destroys leading zeros around a CSV round-trip, and how to stop it at the right stage
It might already be broken before you ever save as CSV
Open the source workbook and check the actual cells, not the CSV. If the codes are right-aligned, Excel is already storing them as numbers and the zero was lost the moment they were entered or imported, long before Save As CSV was ever chosen. If they're left-aligned, the source cells are genuinely text and still have the zero — which means the loss is happening somewhere else.
Or it can get lost on the way back in
CSV has no way to mark a column as text versus number — every value in the file is just a string of characters, with no metadata attached. That means the zero-stripping frequently happens not when the CSV is written, but when it's reopened: double-clicking a CSV file lets Excel's own auto-detection decide each column's type, and a column that looks purely numeric gets converted to numbers on the way in, even though the CSV file on disk still has the zero written out correctly.
Where to actually fix it
If the source cells were already broken, reformat that column as Text, or apply the custom format 00000, and re-enter or re-import the codes from their original source before saving to CSV again. If the loss happens on reopen, avoid double-clicking the CSV to open it — instead use Data > From Text/CSV (or the Text Import Wizard) and explicitly set that column's type to Text during the import step, which stops Excel's auto-detection from touching it.