Enum Workbook.Format

java.lang.Object
java.lang.Enum<Workbook.Format>
com.codename1.spreadsheet.Workbook.Format
All Implemented Interfaces:
Comparable<Workbook.Format>
Enclosing class:
Workbook

public static enum Workbook.Format extends Enum<Workbook.Format>
A file format a workbook is read from or written to.
  • Enum Constant Details

    • XLSX

      public static final Workbook.Format XLSX
      Excel's format, a zip of XML parts.
    • ODS

      public static final Workbook.Format ODS
      The OpenDocument spreadsheet LibreOffice and others write.
    • CSV

      public static final Workbook.Format CSV
      Text with a comma, or another separator that is detected, between values. One sheet, values only.
    • TSV

      public static final Workbook.Format TSV
      Text with a tab between values.
  • Method Details

    • values

      public static Workbook.Format[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Workbook.Format valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • detect

      public static Workbook.Format detect(String fileName, byte[] head)

      Tells the format of a file from its name and its first bytes. The content wins: a zip archive is a spreadsheet whatever the file is called.

      Parameters
      • fileName: the name of the file, may be null

      • head: the first bytes of the file, as many as are at hand; may be null

      Returns

      the format, CSV when nothing says otherwise