[]
        
(Showing Draft Content)

CalculationMode

Enum Class CalculationMode

java.lang.Object
java.lang.Enum<CalculationMode>
com.grapecity.documents.excel.CalculationMode
All Implemented Interfaces:
Serializable, Comparable<CalculationMode>, Constable

public enum CalculationMode extends Enum<CalculationMode>
Specifies the calculation mode used by Microsoft Excel when the exported workbook is opened.

 Workbook workbook = new Workbook();
 workbook.getActiveSheet().getRange("A1").setFormula("SUM(1, 2)");
 workbook.getOptions().getFormulas().setCalculationMode(CalculationMode.Manual);
 workbook.save("path/to/manual-mode.xlsx");
 
  • Enum Constant Details

    • Automatic

      public static final CalculationMode Automatic
      Automatic recalculation. Recalculate whenever something is changed, and every time a workbook is opened.
    • Semiautomatic

      public static final CalculationMode Semiautomatic
      Semiautomatic recalculation. It automatically recalculates everything except for Data Tables and Python formulas.
    • Manual

      public static final CalculationMode Manual
      Manual calculation mode.

      When the exported workbook is opened in Microsoft Excel, formulas are recalculated only when the user explicitly requests calculation.

  • Method Details

    • values

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