Enum Class WorkbookFormat
- All Implemented Interfaces:
Serializable, Comparable<WorkbookFormat>, Constable
活頁簿檔案格式
讀取時由 Workbook.open(java.io.InputStream) 依內容自動判定;
建立時由 Workbook.create(WorkbookFormat) 指定,預設為 XLSX。
格式差異
XLS 為 Excel 97–2003 的舊版二進位格式,先天有下列限制:
除非需要與僅支援舊格式的系統交換檔案,否則建議採用 XLSX。
- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkbookFormatReturns the enum constant of this class with the specified name.static WorkbookFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
XLSX
Office Open XML(.xlsx,Excel 2007 以後) -
XLS
舊版二進位格式(.xls,Excel 97–2003)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-