Java: Open CSV Parser
April 12th, 2010 by jeremychoneParsing CSV is not as simple at it seems. Not hard, but cumbersome.
Here is a simple Lib that does the job: Open CSV (download)
CSVReader reader = new CSVReader(new FileReader(ADDRESS_FILE));
String [] nextLine;
while ((nextLine = reader.readNext()) != null) {
System.out.println("Name: [" + nextLine[0] + "]\nAddress: [" + nextLine[1] + "]\nEmail: [" + nextLine[2] + "]");
}
March 12th, 2011 at 7:09 am
I have ‘\’ in string and CSVReader is not able to recognize it.
How to read ‘\’ character which is generally in path.