CSV File IO - psambit9791/jdsp GitHub Wiki
Variable inputFilename
contains the path of the file to be read as a string.
Csv readObj = new Csv(','); //comma is the separator
HashMap< String, ArrayList< Object>> out = readObj.readCSV(inputFilename, true);
//true implies that the first row represents the column names
Variable outputFilename
contains the path of the file to be written to as a string.
HashMap< String, ArrayList< Object>> result = new HashMap< String, ArrayList< Object>>();
//Fill the result variable with the key (column names) and ArrayList (content of each column)
Csv writeObj = new Csv(','); //comma is the separator
writeObj.writeCSV(outputFilename, result);