简体   繁体   English

如何在uniVocity CsvWriter中附加不带引号的空或空值

[英]How to append empty or null values without quote in uniVocity CsvWriter

Im trying to append row, using CSVWriter by uniVocity 我正在尝试通过uniVocity使用CSVWriter追加行

When i set 当我设定

settings.setQuoteAllFields(true);

then all fields are quoted, this is logical, but can i set any settings NOT to apply quotes in empty or null fields? 那么所有字段都用引号引起来,这是合乎逻辑的,但是我可以设置任何设置以不对空字段或空字段应用引号吗?

For example, when i call 例如,当我打电话

String stringRow = writer.writeRowToString(new String[] {"null","","","123"})

the stringRow is stringRow是

"";"";"";"123"

but i need 但是我需要

;;;"123"

How can i set this? 我该如何设置?

Author of the library here. 这里是图书馆的作者。 Currently there is no such option. 当前没有这样的选择。 You'd have to write the CSV by hand. 您必须手动编写CSV。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM