CsvReader class
A class that reads data from a delimited data set.
Constructors
Csv |
Reads data as a delimited data set. |
Methods
get |
Reads the next row of the delimited file. |
read() | Reads the full delimited data string into a 2D array of strings. [row][cell] |
Constructor Details
CsvReader(string, string, string)
Reads data as a delimited data set.
new CsvReader(delimitedData: string, delimiter?: string, textQualifier?: string)
Parameters
- delimitedData
-
string
The data to read as delimited data.
- delimiter
-
string
The delimiter value to split the cells by. If set to 'auto', the data will be analyzed and a suitable delimiter will be chosen from ',' '|', '\t'. Default: ","
- textQualifier
-
string
The value used to wrap text strings. Default quite (")
Method Details
getNextRow()
Reads the next row of the delimited file.
function getNextRow(): string[]
Returns
string[]
read()
Reads the full delimited data string into a 2D array of strings. [row][cell]
function read(): string[][]
Returns
string[][]