我正在使用org.apache.commons.csv
来读取csv
文件。我的代码看起来像这样
Iterable<CSVRecord> records = CSVFormat.RFC4180.withIgnoreEmptyLines(true)
.parse((Reader)arg0.getReader());
for (CSVRecord record : records) {
}
如何从每个record
中获取逗号分隔的字符串值?
答案 0 :(得分:1)
您可以使用 var replyText = " Signal #"+coinName+ " has reached 1st target! " +profit+ "% profit \nCurrent Price:" +liveCoinPrice+ "\nDuration: " +difference + "\nNote: Message from live coin high node server";
和size()
方法
get(int index)
答案 1 :(得分:1)
用于(CSVRecord记录:记录){
currentRecordSize = record.size();
//代码
}