Dropping leading zeroes on import

  • Thread starter Thread starter Rick Smith
  • Start date Start date
R

Rick Smith

When I run an interface from an application to a .csv file
it drops all of my leading zeroes. Conversely, the same
thing happens when I open a delimited text file in Excel.
I can go into Excel individually and change the format of
the column to Custom but that takes a long time with 100+
files. This did not happen in previous version of Excel
and is causing a serious hiccup in our operations. Can
anyone help me? Thanks
 
Rick,

Are you sure that the application is dropping the leading
zeros? Rename the .csv to a .txt extension and take a
look at the actual file.

If the csv file has leading zeros you can rename it to .txt
and open in excel. This will take you to the text import
wizard where you can specify what format you want for
each column to be imported. Set the ones with leading
zeros to text.

Dan E
 
But what if you NEED to keep it at a .csv file.
Frequently, we load the .csv file into a program that is
looking for comma delimited data. Not good when the
leading zeros is relevent to the data.
 
It doesn't matter unless you are opening it in excel, it is excel that will
drop the zero. When you save as CSV with a leading zero it will stay that
way. If it does not show a leading zero in the program you open it with then
it is that program that strips it off..
 
Back
Top