Why is my .CSV import file missing leading zeros in my part numbers?


If you have created a .CSV file for import from Microsoft Excel, and your Item IDs normally would have leading zeros and only be numbers (i.e. Part number 00001512) then it's quite possible when you saved that Excel spreadsheet to a .CSV file, the leading zeros were removed, so your part number in the above example would look like "1512" in the file.


This is not a function of DBA, rather it is happening within Excel when the data is saved. Excel treats the data with leading zeros in a cell of only numbers as a numeric value, rather than a character value and so during saving to .CSV the leading zeros are removed.


What we recommend as an alternative is to use a different editing program that does not remove leading zeros on save, or that will treat the data properly as characters. One example that can be freely obtained is OpenOffice, which can be downloaded here:


http://www.openoffice.org/download/


Please note: You will still need to format that column as character data not numeric data.


Alternatively you may wish to work only with Excel. After saving the .CSV file from Excel, open it with a text editor (such as WordPad, Notepad, or other editor) and manually edit the part number data to insert the appropriate missing zeros into the part number.


For example, if the data on a line was saved as:

"1512","Example Item","Category","M"

you would add in the proper zeros to the part number so it read:

"00001512","Example Item","Category","M"