[ANN] CSV Parser Library 1.0.0
Shao Sean
shaosean at wehostmacs.com
Mon Mar 8 18:30:34 EST 2010
This is something I put together a while back and with the recent
discussion on the use-list I figured I would make it available for
those that could use it..
This library will parse a CSV file into a multi-dimensional array (I
included a simple CSV file).. On large data sets the library might
take a while as it does basically crawl through the data character by
character in some instances..
Syntax:
parseCSV( data )
parseCSV( data, true )
If the second parameter is true, the library will use the first row of
the data as names for the column headers (like the data grid).. The
data is returned in a multi-dimensional array where the first element
is the row number and the second element is the column number (or
name)..
returnedDataArray[1][1] -- first row, first column
returnedDataArray[10][3] -- tenth row, third column
returnedDataArray[3]["file name"] - third row, column named "file
name"
This is released into the public domain but if you can help speed it
up or know a slightly better way of doing some code in the library,
please help out :-)
-Sean
http://shaosean.tk/
More information about the use-livecode
mailing list