Edit CSV without losing leading zeros in IDs
Product codes, postal codes, and account IDs sometimes begin with zeros. In a CSV, 00421 can represent an identifier with five characters. An app that imports it as a number can display it as 421.
- Open your file with CSV Viewer. Check the header and confirm that values such as
00421still have their original width. - Open CSV Editor, choose the cell you want to change, and enter the full identifier. Use Add row for a new record.
- Export a copy and reopen that copy in the viewer. Check a few sample IDs and any fields that contain commas.
When importing into an app that guesses data types, select Text for identifier columns if the import offers that option. If the destination requires tabs between fields, convert the edited CSV to TSV, then check the import settings there too.