0
0

More than 1 year has passed since last update.

opencsvのCSV書き出し(CSVWriter)で囲み文字をなくす

Posted at

結論

CSVWriterの引数多いほうのコンストラクタにICSVWriter.NO_QUOTE_CHARACTERを渡す。
char型で定義されているので¥u0000を渡してもいいはず。

実例

Path p = Paths.of('xxx');
try (
BufferedWriter bw = Files.newBufferedWriter(p, StandardCharsets.UTF_8);
CSVWriter writer = new CSVWriter(writer
    , CSVWriter.DEFAULT_SEPARATOR
    , CSVWriter.NO_QUOTE_CHARACTER
    , CSVWriter.DEFAULT_ESCAPE_CHARACTER
    , CSVWriter.DEFAULT_LINE_END) {
    // ... 
}

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0