Face Book
2015-01-27 15:41:09 UTC
Hi All,
I need to read a csv file using vbscript See Sample below of CSV:
SAMPLE of CSV File:
ANGLIA,89305,1,4'6 SYMPHONY,441048,12558/18346/MCAFEE,3
ANGLIA,89305,1,4'6 FLOOR STANDING,441048 12558/18346/MCFEE,1
ANGLIA,89305,2,4'6 SENSATION,441048,12579/18449/SPARKES,2
when the line is read, it needs to look at the last column and in this example on line 1 is 3 this means this particular line needs to be written 3 times to a new file. etc etc
The output csv need to look like this:
ANGLIA,89305,1,4'6 SYMPHONY,441048,12558/18346/MCAFEE,3
ANGLIA,89305,1,4'6 SYMPHONY,441048,12558/18346/MCAFEE,3
ANGLIA,89305,1,4'6 SYMPHONY,441048,12558/18346/MCAFEE,3
ANGLIA,89305,1,4'6 FLOOR STANDING,441048 12558/18346/MCFEE,1
ANGLIA,89305,2,4'6 SENSATION,441048,12579/18449/SPARKES,2
ANGLIA,89305,2,4'6 SENSATION,441048,12579/18449/SPARKES,2
Hope this helps
Thanks in advance
Faizal
I need to read a csv file using vbscript See Sample below of CSV:
SAMPLE of CSV File:
ANGLIA,89305,1,4'6 SYMPHONY,441048,12558/18346/MCAFEE,3
ANGLIA,89305,1,4'6 FLOOR STANDING,441048 12558/18346/MCFEE,1
ANGLIA,89305,2,4'6 SENSATION,441048,12579/18449/SPARKES,2
when the line is read, it needs to look at the last column and in this example on line 1 is 3 this means this particular line needs to be written 3 times to a new file. etc etc
The output csv need to look like this:
ANGLIA,89305,1,4'6 SYMPHONY,441048,12558/18346/MCAFEE,3
ANGLIA,89305,1,4'6 SYMPHONY,441048,12558/18346/MCAFEE,3
ANGLIA,89305,1,4'6 SYMPHONY,441048,12558/18346/MCAFEE,3
ANGLIA,89305,1,4'6 FLOOR STANDING,441048 12558/18346/MCFEE,1
ANGLIA,89305,2,4'6 SENSATION,441048,12579/18449/SPARKES,2
ANGLIA,89305,2,4'6 SENSATION,441048,12579/18449/SPARKES,2
Hope this helps
Thanks in advance
Faizal