When opening a CSV (Comma Separated Value) file, Excel automatically trims leading 0s from data, even if the value should contain one or more leading zeroes. Then when the CSV file is imported or linked with Wasp software, the values are incorrect.
Excel assumes that values containing numeric digits should be treated as numbers, and trims the leading 0s from the data. When saving changes back into the CSV file, the leading zeroes are not included. These behaviors are characteristics of Excel, a Microsoft product.
- Rename the file so the extension is .txt instead of .csv (If you don't see the extension, you will need to enable viewing them. If you're not sure how, do a web search for "view file extensions" and your version of Windows, for example "Windows 7".)
- In Excel, begin the process of opening a file.
- Find the File Type popdown menu. There may be a notation such as "Files of Type", or you may just see a popdown menu that starts "All Excel Files..."
- Change the File Type to "All Files (*.*)"
- Double-click your text file (or select it and click OK button). The Text Import Wizard window appears.
- Click Next (don't make any changes; file type is delimited).
- Uncheck the Tab delimiter, and check Comma. Click Next.
- Select the column(s) that you need to see leading 0s in, and change the Column Data Format to Text. Click Finish.
- The data now displays in Excel with the leading 0s.
- This workaround needs to be performed each time the file is opened in Excel, since text-formatted files do not contain any data-formatting metadata.
- This Excel workaround also works for Spreadsheets from Kingsoft (a freeware spreadsheet program).