Class CsvOptions

java.lang.Object
io.keikai.axyra.sheets.io.CsvOptions

public final class CsvOptions extends Object
Options for Workbook.saveCsv(path, options). The defaults write what a plain save("x.csv") writes, which is what Excel's Save As CSV writes: the active sheet, comma-separated, as display text.

 wb.saveCsv(path, CsvOptions.create().sheet("Payments").values(CsvOptions.Values.RAW));
 
  • Constructor Details

    • CsvOptions

      public CsvOptions()
  • Method Details

    • create

      public static CsvOptions create()
    • sheet

      public CsvOptions sheet(int index)
      The sheet to write, by 0-based index (default: the active sheet).
    • sheet

      public CsvOptions sheet(String name)
      The sheet to write, by name (default: the active sheet).
    • delimiter

      public CsvOptions delimiter(char delimiter)
      The field separator (default ','); one ASCII character other than a quote or line break.
    • values

      public CsvOptions values(CsvOptions.Values values)
      Display text (default) or stored values.
    • utf8Bom

      public CsvOptions utf8Bom(boolean bom)
      Whether to start the file with a UTF-8 byte-order mark, as Excel's "CSV UTF-8" does (default false).
    • sheetIndex

      public int sheetIndex()
      The sheet index, or -1 for "the active sheet" / a sheet named by sheetName().
    • sheetName

      public String sheetName()
      The sheet name, or null when not chosen by name.
    • delimiter

      public char delimiter()
    • values

      public CsvOptions.Values values()
    • utf8Bom

      public boolean utf8Bom()