Online documentation for CSVFileReader
Generated 2006-03-17
Reads from a CSV (ie comma-seperated) file
Description
The CSVFileReader is capable of reading from
a comma-seperated file, as might be exported
by Excel for example. It can parse
files whose first line is a comma-seperated
list of column headers, or those
which do not define column headers.
Configuration
Set property configFileName to
the full path of your file. It is probably best to use
forward slash characters in this rather than
backslash characters eg
d:/data/datafile.csv
rather than
d:\data\datafile.csv.
Then set the configured property to true.
If the file exists, it will be loaded into the component,
and an indication of the number of rows and columns of data
it contains will be given through the
rowCount and columnCount properties.
Usage
Once you have configured the component with a file, then
there are several ways to access the data it contains:
- access the data directly through the data property
- use the currentRowIndex or currentColumnIndex
properties to select a particular row or column. Data from
this row or column will then appear on either property
currentRow or currentColumn