Last updated
Last updated
Returns: the generated CSV as a string.
In this case, csv_file
is
Suppose we have an asset
data model object with (amongst others) name
and cost
as fields, and we want to generate CSV for all assets and their names and costs:
Returns: the parsed CSV as an array of arrays.
Assume csv_file
's content is:
source
One of:
Array
Matrix (array of arrays)
options
(Optional)
Object with the following properties:
heading
: Array of column headings. Use null
to generate a CSV file without a header row.
delimiter
: Character to separate columns with.
Defaults to ,
source
String
options
(Optional)
Object with the following properties:
delimiter
: Character to separate columns with. If no delimiter
is specified, the library detects and uses the appropriate one