dropping leading zero's from .csv file

  • Thread starter Thread starter Colin Johnson
  • Start date Start date
C

Colin Johnson

I've seen a couple of posts here with similar problems but
the proposed solutions will not work for my situation.

I have a third-party program which generates Comma-
Delimited (csv) files. Some of the data in these files
has, and requires, leading zero's. On occasion there will
be a minor error in the generation of these files am I
will be required to manually correct the data. And this is
where the problem occurs...if I open the file with Excel
to take advantage of it's Find/Replace functions, Excel
promptly drops all leading zero's. I can use Notepad and
it retains the data structure but is much more difficult
to find the data that needs changing.
Is there a way to cause Excel to default the cell format
to 'Text' rather than 'General' when opening, not
creating, a file? I know I could set a style within Excel
or several other things but these only apply to files
generated by Excel, not external data.
Thanks in advance for any advice.
 
You can use the text import wizard, do data>import external data,
import data, find the folder with your file, show all file types and open
the file,
now in step 3 you can select the column data format and change it to text,
then click finish.
Record a macro while you are doing this..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top