|
| ||||||||||
| Tags: csv file, script, vb script |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| New data to the first line in *.csv file via VB Script
Welcome every one. I have some data in CSV I need to open this CSV file via VBS script and add some data in the end of first line and save this file. For example aaa;bbb;ccc 111;111;111 222;222;222 should be: aaa;bbb;ccc;ddd;eee;fff 111;111;111 222;222;222 Hot to do it with VBS ? Best Regards C |
|
#2
| |||
| |||
| Re: New data to the first line in *.csv file via VB Script
Can you try the below code and see if that will work: Code: Set outputFile = fso.OpenTextFile(File1, ForWriting, True)
Set inputFile = fso.OpenTextFile(File2, ForReading)
Do While inputFile.AtEndOfStream <> True
arr = Split(inputFile.ReadLine, ",")
arr(3) = "E"
outputString = Join(arr, ",")
outputFile.WriteLine outputString
Loop |
|
#3
| |||
| |||
| Re: New data to the first line in *.csv file via VB Script Quote:
I'll check this. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "New data to the first line in *.csv file via VB Script" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script to extract data from text file and put into excel format | tdubb | Windows Server Help | 19 | 17-11-2010 03:19 PM |
| Can't convert documents in Php script (via command line) | eawade | Windows Software | 2 | 20-01-2010 05:34 AM |
| How to let Java read text file line by line. | Visala28 | Software Development | 3 | 04-08-2009 11:30 PM |
| Script to insert new line in a file in linux | OSzilla | Operating Systems | 3 | 28-07-2009 11:48 PM |
| Bash Script, read without new line | Kieran | Software Development | 2 | 06-02-2009 08:59 PM |