General information
Title:
Tab delimited text file
I am trying to create a tab delimited text file.
I am creating a text file with CreateTextFile with a .txt extension:
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(textfilename & ".txt", True)
I create a variable which holds my tab character:
tabchar = Chr(9),
then I insert the variable in between fields,
I use WriteLine to write each record to the file:
a.WriteLine(field1 & tabchar & field2 & tabchar &.......& tabchar & fieldn)
It seems to be working right, but when I try to use the file to import into other programs, sometimes the tabs aren't recognized.
any ideas?
thanks for your time,
Ryan
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only