Reputation: 443
Like the question says, how do I do this.
Upvotes: 0
Views: 1810
Reputation: 772
Use OpenCSV, it will be quick and easy
CSVReader reader = new CSVReader(new FileReader("C:\\Documents\\file.csv"));
List<String[]> csvValues = reader.readAll();
This code sample will give you a List with String arrays inside of it.
Upvotes: 2
Reputation: 4202
Use split() method on the read line to get the array. The method takes in the regular expression for splitting.
Upvotes: 0