CsvWriter class
A class that writes data as a delimited data set.
Constructors
Csv |
Writes data as a delimited data set. |
Methods
clear() | Resets the writer to its initialized state and removes any data it contains. |
to |
Writes the content of the CsvWriter. |
write(any[][]) | Writes multiple rows of data as a delimited string. |
write |
Writes a row as a delimited string. |
Constructor Details
CsvWriter(string, string)
Writes data as a delimited data set.
new CsvWriter(delimiter?: string, textQualifier?: string)
Parameters
- delimiter
-
string
The delimiter value to split the cells by. Default: ","
- textQualifier
-
string
The value used to wrap text strings. Default quote (")
Method Details
clear()
Resets the writer to its initialized state and removes any data it contains.
function clear()
toString()
Writes the content of the CsvWriter.
function toString(): string
Returns
string
write(any[][])
Writes multiple rows of data as a delimited string.
function write(data: any[][])
Parameters
- data
-
any[][]
The data to convert into a delimited string.
writeRow(any[])
Writes a row as a delimited string.
function writeRow(data: any[])
Parameters
- data
-
any[]