Hi all
I have to read a csv file, update the 6th column and write the record out again.
I know I could do this with a call to Excel but I can't remember how to do it. I think it would also be very slow.
So, instead I'm reading the input CSV, updating the 6th column and writing it out to a new CSV file.
This is great except the new file has quotes around each column.
How do I write the record without the quotes?
Thanks
00015 DIM CSVREC$[1:7]
00016 IOLIST CSVREC${ALL}:[STR(",")]
00021 OPEN (2)"/HIT/TEMP/CUSTOMER.CSV"
00022 LET CUSTOMEROUT$="/HIT/TEMP/CUSTOMEROUT.CSV"
00023 ERASE CUSTOMEROUT$,ERR=*NEXT
00024 SERIAL CUSTOMEROUT$
00025 OPEN LOCK (3)CUSTOMEROUT$
00030 READ (2,END=0500)IOL=0016
00032 CSVREC$[6]=123456"
00034 WRITE (3)IOL=0016
This becomes
name@gmail.com,base,default,David,Chard,,
this
"name@gmail.com","base","default","David","Chard","123456","",