I just did something very similar last week. 'CSV' is a VM delimited
dynarray to be converted:
VCNT=DCOUNT(CSV,@VM)
FOR VPTR=1 TO VCNT
CSVCELL=CSV<1,VPTR>
IF INDEX(CSVCELL,',',1) OR INDEX(CSVCELL,'"',1) THEN
CSVCELL=CHANGE(CSVCELL,'"','""')
CSVCELL=QUOTE(CSVCELL)
CSV<1,VPTR>=CSVCELL
END
NEXT VPTR
CONVERT @VM TO ',' IN CSVDATA
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Israel, John
R.
Sent: Monday, February 06, 2012 5:26 PM
To: U2 Users List
Subject: Re: [U2] Building an Excel File
I have always tried to avoid csv files because we have all kinds of
characters in our descriptions (commas, double and single quotes, etc.)
It is also very easy to build a row of data with 254 delimiters, then
simply convert @FMs to tabs.
That being said, do you have a good subroutine to build csv rows that
will not get confused with commas or quotes in the data? I am willing
to give this a try.
John Israel
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users