在.tsv文件中,由于“#”(如“#HELLO”),HELLO打印在双引号中。我希望在写入.tsv时删除双引号
电流输出-〉"#HELLO"
预期输出-〉#HELLO
try ( CSVPrinter printer = new CSVPrinter(new FileWriter("data.tsv"), CSVFormat.TDF))
{
printer.printRecord("#HELLO");
}catch (IOException ex) {
ex.printStackTrace();
}
2条答案
按热度按时间14ifxucb1#
您需要调整格式
mpgws1up2#
我改变了版本的CSVCommons到1.8和下面的代码是为我工作...