How can I format the #of decimals, field types, etc. automaticall.
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. JOET wrote: 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. -- Dave Peterson |
All times are GMT +1. The time now is 09:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com