Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1.12 KB

CSVWriter.new.md

File metadata and controls

31 lines (25 loc) · 1.12 KB

new CSVWriter

The constructor function is established to create a CSVWriter object.

Sample

//The content of the test.csv file is 
//"A,B,C,D
// 1,2,3,4
// a,b,c,d"
var csvWriter = new CSVWriter("input/test.txt", ",", "\"", "MS932");

API

CallingReturning
new CSVWriter (path)CSVWriter
new CSVWriter (path, separator)CSVWriter
new CSVWriter (path, separator, delimiter)CSVWriter
new CSVWriter (path, separator, delimiter, encoding)CSVWriter
ParametersTypeDescription
pathStringThe relative CSV file path to the storage folder.
separatorStringThe separator of the CSV file. The default value is ",".
delimiterStringThe delimiter of the CSV file. The default value is "\"".
encodingStringThe charset name of the CSV file. The default value is UTF-8.