CSV

  • Thread starter Thread starter Darren
  • Start date Start date
D

Darren

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?
 
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
 
Back
Top