Enum Workbook.Format
- All Implemented Interfaces:
Comparable<Workbook.Format>
- Enclosing class:
Workbook
A file format a workbook is read from or written to.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Workbook.FormatTells the format of a file from its name and its first bytes.static Workbook.FormatReturns the enum constant of this type with the specified name.static Workbook.Format[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
XLSX
Excel's format, a zip of XML parts. -
ODS
The OpenDocument spreadsheet LibreOffice and others write. -
CSV
Text with a comma, or another separator that is detected, between values. One sheet, values only. -
TSV
Text with a tab between values.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
detect
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
-
-