How can I format the #of decimals, field types, etc. automaticall.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am importing a delimited file, it can be a csv, tab delimted, doesn't
matter, but I want it to come up in excel properly formatted to the # of
decimal places each field is formatted with in the delimited file. I also
want zip code to come in with a leading 0, not be interpreted as a number
even though I have enclosed it in quotes.
 
If you double click on a .csv file, excel will open it the way it wants.

If you rename the file to .txt, you could see the import wizard and format each
field as text--but that makes arithmetic a little more difficult. (I wouldn't
do it this way.)

I'd rename the file to .txt and record a macro when I imported it. I'd use
general for the numeric fields and then format those fields after I imported it
(still recording the code).

Then I could just rerun this recorded macro when I wanted to open a text file
(.txt--not .csv) of the same format.
 

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