Enum Class CalcMode

java.lang.Object
java.lang.Enum<CalcMode>
io.keikai.axyra.sheets.calc.CalcMode
All Implemented Interfaces:
Serializable, Comparable<CalcMode>, Constable

public enum CalcMode extends Enum<CalcMode>
The workbook calculation mode, read with Workbook.calcMode() and set with Workbook.setCalcMode(CalcMode). It is saved to the file, so Excel uses the same mode on open.
  • Enum Constant Details

    • AUTOMATIC

      public static final CalcMode AUTOMATIC
      Recalculates dependent formulas after every change; Excel's default. Switching to this mode from MANUAL recalculates the pending cells at once.
    • MANUAL

      public static final CalcMode MANUAL
      Recalculates only when asked: Workbook.recalculate() or Workbook.recalculateDirty(). Until then, formula cells keep their old values, and a save writes those values.
    • AUTOMATIC_EXCEPT_TABLES

      public static final CalcMode AUTOMATIC_EXCEPT_TABLES
      Excel's "Automatic except for data tables" (calcMode="autoNoTable"). The engine recalculates exactly as in AUTOMATIC, because it has no what-if data tables. The mode is kept and written back, so Excel applies it on open.
  • Method Details

    • values

      public static CalcMode[] 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 CalcMode 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
    • code

      public int code()
      The engine code: 0 automatic, 1 manual, 2 automatic except tables.
    • fromCode

      public static CalcMode fromCode(int code)
      The mode for an engine code.
      Parameters:
      code - the engine code, see code()
      Returns:
      the mode; AUTOMATIC for an unknown code