Microsoft Excel will automatically convert data columns into the format that it thinks is best when opening comma-separated data files. For those of us that don’t want our data changed, we can change that behavior.

You have a CSV file probably exported from other application or given to you by other people. You would like to open it up in Excel since you know it very well. The CSV file will look like this (if you open the file in notepad.exe):


The file contains columns: ProductModelID, Name, SpecialID, and ModifiedDate. The column SpeicalID containing data with leading 0 and it is specialized code so you would like to keep the leading 0s in Excel. Since it is a CSV file it is, by default, shown in your Windows Explorer as an Excel file:


So you double-click the file and open the file in Excel as such:


You can see that by default, Excel stripped out the leading 0s in column 3 “SpecialID