The purpose of this article is to show the process on how to ensure the leading zeroes stay on a CSV file.
- Click on Save to my computer as
- Select either CSV or CSV (with options)
- Click Save -- DO NOT OPEN THE CSV FILE DIRECTLY WITH EXCEL!
- Open a new worksheet in Excel (see below for Excel screenshots.)
- Open the Data tab
- Click on the From text button in the Get External Data section
- Select your CSV file to import
- Select the "Delimited" radio button -- Text Import Wizard, Step 1 determines that your data is delimited
- Click Next
- Check "Comma" as a delimiter (column dividers will appear in preview)-- Step 2 lets you set delimiters
- Click Next
- Highlight the column(s) with leading zeros in Step 3
- Mark those columns format as "text" by clicking the radio button in the Column Data Format section. NOTE: You will need to do this for each column where the data contains leading zeros.
- Click Finish
- The leading zeros will still be there in the new worksheet with the imported data. The columns with real numbers will still be able to be used with calculations.
Please Note: The file doesn't have to be a CSV file. It can be a text file as well. If it is a text file, in step 10 use "TAB" as the column finder, not "comma".