View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Brown[_7_] Gary Brown[_7_] is offline
external usenet poster
 
Posts: 14
Default Keeping leading zeros in field

It sounds like you are formatting the actual cells in the
Excel worksheet as 'text' prior to importing the text file.
What you should be doing is...in step 3 of 3 in the import
process, make sure that you make column 3 text.
HTH,
Gary Brown



-----Original Message-----
I have a delimitted file that is created in an

application. One of the
fields has leading zeros which must be kept when

importing into Excel.
However, the zeroes get stripped out. I can not change

the format of the
delimmitted file being imported due to application

limitations creating the
file.

Here is a sample of a record in the delimited file.

"12202","ABC Company","001234567"

I have set the format for the cells I am importing

to "text" but it still
strips out the leading zeroes. How do I make sure the

leading zeroes are
kept using either formatting or programming?

Note the field will either be blank (will be "" in the

delimmitted file) or
will have nine digits. I need to keep all nine digits

and ignore the blanks.

Thanks for your help.

Joe
.