Enum Class WorkbookFormat

java.lang.Object
java.lang.Enum<WorkbookFormat>
io.leandev.appfuse.workbook.WorkbookFormat
All Implemented Interfaces:
Serializable, Comparable<WorkbookFormat>, Constable

public enum WorkbookFormat extends Enum<WorkbookFormat>

活頁簿檔案格式

讀取時由 Workbook.open(java.io.InputStream) 依內容自動判定; 建立時由 Workbook.create(WorkbookFormat) 指定,預設為 XLSX

格式差異 XLS 為 Excel 97–2003 的舊版二進位格式,先天有下列限制:

  • 每張工作表上限 65,536 列 × 256 欄(XLSX 為 1,048,576 列 × 16,384 欄)
  • 顏色僅有 56 色的索引調色盤,無法表示任意 RGB(見 CellStyle

除非需要與僅支援舊格式的系統交換檔案,否則建議採用 XLSX

Since:
4.0.0
  • Enum Constant Details

    • XLSX

      public static final WorkbookFormat XLSX
      Office Open XML(.xlsx,Excel 2007 以後)
    • XLS

      public static final WorkbookFormat XLS
      舊版二進位格式(.xls,Excel 97–2003)
  • Method Details

    • values

      public static WorkbookFormat[] 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

      public static WorkbookFormat valueOf(String name)
      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 name
      NullPointerException - if the argument is null