Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CSV
I'm using VBScript to create a csv file.
I have a zip code field, that keeps being imported as general and therefore, drops the first zero. I have tried to replace the string with &Chr(34) to create double quotes. Is there a way in vbscript to specify the TYPE of field on IMPORT, so when the csv is created, it will specify a field as text? Basically, If I import a txt file into excel, I can specify each field type. Can I do it in vbscript code? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
CSV
There is no way to do this for outputting a file.
If you open the file as a CSV file, then excel will perform its own interpretation. Rename the file as .Txt and open it with the opentext method and specify the column types, or us low level file io to open it and parse it with your code. Regards, Tom Ogilvy Darren wrote in message ... I'm using VBScript to create a csv file. I have a zip code field, that keeps being imported as general and therefore, drops the first zero. I have tried to replace the string with &Chr(34) to create double quotes. Is there a way in vbscript to specify the TYPE of field on IMPORT, so when the csv is created, it will specify a field as text? Basically, If I import a txt file into excel, I can specify each field type. Can I do it in vbscript code? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|