another thing to do is to load up your csv data into a variable (such as local$mydata) with a file read action and then break it apart like so:
<@assign local$mydatatatable value="<@array value='@@local$mydata' cdelim=',' rdelim='<@crlf>'">
after that's done local$mydatatable will be an array holding your csv data.
a couple "gotchas" to be wary of...
1) if there is a comma in the data such as "hello, world", 3, 5 then witango will unfortunately break that into 4 columns, not 3 like you would want. It would look like... ["hello] [world"] [3] [5]
There are ways to get around this programatically though!
2) if the file doesn't have a <@crlf> at the end of each line (crlf is a windows thing, other operating systems use a different end of line code) then the above wont work. I can't remember if other OS's use character 10 or character 13 as their end of line code so you'd have to try both and see which one worked but you can do either as an rdelim by using... <@char code=10> or <@char code=13>
On 9/21/06, Anthony M. Humphreys <[EMAIL PROTECTED]> wrote:
Depending on how you are getting/using this CSV file, the easiest, fastest,
most common thing to do is to use the text/CSV ODBC driver and just use it
as table from a a datasource
----- Original Message -----
From: "MC Tay" <[EMAIL PROTECTED]>
To: <[email protected] >
Sent: Wednesday, 13 September, 2006 12:38
Subject: Witango-Talk: Reading CSV file
> Hi:
>
> Does anyone has any example or tool in WiTango to read in CSV formatted
> file? Especially on extracting address string with comma within the double
> quotes.
>
> Thanks!
>
> MC
>
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
