读写csv 文件

 参见:http://opencsv.sourceforge.net/

 

 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...");
    }

你可能感兴趣的:(读写csv 文件)