gst*_*low 3 java csv parsing header apache-commons-csv
我有通常的带标题的 csv 文件
f1, f2, f3
1, 2, 3
Run Code Online (Sandbox Code Playgroud)
我尝试解析它:
Iterable<CSVRecord> records = CSVFormat.EXCEL.withIgnoreEmptyLines().withSkipHeaderRecord().parse(in);
records.forEach(record -> {
...
Run Code Online (Sandbox Code Playgroud)
但无论如何,第一条记录无论如何都是标题。
我有什么错吗?
specify that file have header to skip:
CSVFormat.EXCEL.withHeader().withSkipHeaderRecord();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2254 次 |
| 最近记录: |