The above text should work, with one exception -- many people use bar-delimited text because the vertical bar rarely appears in "real" data. However, it IS possible for the quotes to appear in the data.
You can add this as line 15.5 in the above script to address this:
strLine = Replace(strLine, Chr(34), Chr(34) & Chr(34))
This should double all existing sets of double-quotes before you add the extra ones...
Main Topics
Browse All Topics





by: Shift-3Posted on 2009-08-25 at 14:27:54ID: 25182453
Paste the script below into a text file with a .vbs extension. Running it with the input file as the first argument and the output file as the second argument (e.g.script.vbs "file a.txt" "file a.csv") will create a comma-delimited text file.
Select allOpen in new window