Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- compile 'com.opencsv:opencsv:3.9'
- import com.opencsv.CSVReader;
- import java.io.IOException;
- import java.io.FileReader;
- ...
- try {
- CSVReader reader = new CSVReader(new FileReader("yourfile.csv"));
- String[] nextLine;
- while ((nextLine = reader.readNext()) != null) {
- // nextLine[] is an array of values from the line
- System.out.println(nextLine[0] + nextLine[1] + "etc...");
- }
- } catch (IOException e) {
- }
- CSVReader reader = new CSVReader(new FileReader("yourfile.csv"));
- List myEntries = reader.readAll();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement