csv ( string path , string[] data , string _separator , string _quoteChar , string _escapeChar , string _encoding ) : void
Write data in a csv file. Each time you call this function, it will just write one new line in the CSV. If the CSV does not exist, it will create it.
Example
for(data in myData)
{
id=get(data, "id")
name=get(data, "name")
csv("C:\\User\\Admin\\Desktop\\CSV.csv",[
"ID" : id,
"Name" : name,
"Website" : "site.com"
])
See also
csvToArrayParameters
path
The path to the CSV file with the .csv extension
data
An associative array grouping in key the names of the columns and in value the data to write on the line of the CSV file.
If the CSV file is created for the first time, the function adds the first row of headers. For the following ones the correspondence is established by the column names.
If the CSV file is created for the first time, the function adds the first row of headers. For the following ones the correspondence is established by the column names.
_separator (optional)
default:";" . Column separator. The standard is "," but Excel uses ";".
_quoteChar (optional)
default:'"'. The delimiters for the texts that require it.
_escapeChar (optional)
default:'"'. The escape character.
_encoding (optional)
default:'ISO-8859-1'. The encoding system. With some Excel version prefer UTF-8.