saveCSV(file, data, [delimiter])

Encodes a CSV-object array to multi-line strings and saves it to a CSV file. If the given file exists it gets overridden.

Type: function

Parameter(s):

  • file {String | File}:

    The file name or a File instance.

  • data {Object}:

    The object to encode and save in the file.

  • delimiter {String} Optional:

    optional character[s] used to separate data.

Returns:

  • {File}:

    The CSV file the data was written to.