我正在尝试在csv文件上写入,如下函数所示:
private void writeDataToCSVDestinationFile(Path csvPath, Path destPath, String colToNormalize) throws IOException, CsvException {
CSVWriter writer = new CSVWriter(new FileWriter(destPath.toString()));
CSVReader reader = new CSVReader(new FileReader(csvPath.toString()));
String [] headerDes = new String [header.length+1];
for (int i=0; i<header.length; i++){
headerDes[i]= header[i];
}
headerDes[header.length]= colToNormalize+"_z";
writer.writeNext(headerDes);
writer.close();
}
但我失败了:
expected: <id,name,mark,mark_z> but was: <"id","name","mark","mark_z">
我怎样才能以这种格式制作并跳过报价?
暂无答案!
目前还没有任何答案,快来回答吧!