The constructor function is established to create a CSVReader object for event returning.
//The content of the test.csv file is
//"A,B,C,D
// 1,2,3,4
// a,b,c,d"
var csvReader = new CSVReader("input/test.txt", ",", "\"", "MS932");
Calling | Returning |
new CSVReader (path) | CSVReader |
new CSVReader (path, separator) | CSVReader |
new CSVReader (path, separator, delimiter) | CSVReader |
new CSVReader (path, separator, delimiter, encoding) | CSVReader |
Parameters | Type | Description |
path | String | The relative CSV file path to the storage folder. |
separator | String | The separator of the CSV file. The default value is ",". |
delimiter | String | The delimiter of the CSV file. The default value is "\"". |
encoding | String | The charset name of the CSV file. The default value is UTF-8. |