Namespace EasyXLS

Class ExcelOptions

System.Object
EasyXLS.ExcelOptions

public class ExcelOptions extends System.Object
This class stores some of the options of an Excel document, available in the main menu Tools/Options window.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Defines an instance of the ExcelOption class.
  • Method Summary

    Modifier and Type
    Method
    Description
    bool
    Returns the flag that stores if the formulas are calculated when the document is saved.
    Creates and returns a copy of this object.
    const bool
    Returns the flag that stores if the errors or the warnings are displayed on the console.
    int
    Returns the encryption type.
    double
    Returns the upper bound for values when the circular references are calculated.
    int
    Returns the maximum number of iterations when the circular references are calculated.
    System.String
    Returns the password required for modifying the document.
    System.String
    Returns the password required for opening the document.
    bool
    Returns true if the iterative calculation is enabled, false otherwise.
    bool
    Returns the R1C1 reference style of the document.
    void
    setCalculateFormulas​(bool calculateFormulas)
    Sets the flag that stores if the formulas are calculated when the document is saved.
    void
    setDisplayErrors​(bool displayErrors)
    Sets the flag that stores if the errors or the warnings are displayed on the console.
    void
    setEncryptionOptions​(int encryptionType, System.String passwordToOpen)
    Sets the encryption options when a file is written and the document is encrypted.
    void
    setIterativeCalculation​(bool enable, int maximumIterations, double maximumChange)
    Sets the iterative calculation option for circular references.
    void
    setPasswordToModify​(System.String passwordToModify)
    Sets the password required for modifying the document.
    void
    setPasswordToOpen​(System.String passwordToOpen)
    Sets the password required for opening the document.
    void
    setR1C1ReferenceStyle​(bool isR1C1ReferenceStyle)
    Sets the R1C1 reference style of the document.

    Methods inherited from class System.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExcelOptions

      public ExcelOptions()
      Defines an instance of the ExcelOption class.
  • Method Details

    • CalculateFormulas

      public bool CalculateFormulas()
      Returns the flag that stores if the formulas are calculated when the document is saved.
      Returns:
      true if the formulas are calculated when the document is saved, false otherwise
      See Also:
      setCalculateFormulas(bool)
    • setCalculateFormulas

      public void setCalculateFormulas(bool calculateFormulas)
      Sets the flag that stores if the formulas are calculated when the document is saved.
      Parameters:
      calculateFormulas - true if the formulas are calculated when the document is saved, false otherwise
      See Also:
      CalculateFormulas()
    • setIterativeCalculation

      public void setIterativeCalculation(bool enable, int maximumIterations, double maximumChange)
      Sets the iterative calculation option for circular references.
      Parameters:
      enable - true if the iterative calculation is enabled for circular references
      maximumIterations - the maximum number of iterations when the circular references are calculated
      maximumChange - the upper bound for values when the circular references are calculated
      See Also:
      IsIterativeCalculation(), getMaximumIterations(), getMaximumChange()
    • IsIterativeCalculation

      public bool IsIterativeCalculation()
      Returns true if the iterative calculation is enabled, false otherwise.
      Returns:
      true if the iterative calculation is enabled, false otherwise
      See Also:
      setIterativeCalculation(bool, int, double), getMaximumIterations(), getMaximumChange()
    • getMaximumIterations

      public int getMaximumIterations()
      Returns the maximum number of iterations when the circular references are calculated.
      Returns:
      the maximum number of iterations when the circular references are calculated
      See Also:
      setIterativeCalculation(bool, int, double), IsIterativeCalculation(), getMaximumChange()
    • getMaximumChange

      public double getMaximumChange()
      Returns the upper bound for values when the circular references are calculated.
      Returns:
      the upper bound for values when the circular references are calculated
      See Also:
      setIterativeCalculation(bool, int, double), IsIterativeCalculation(), getMaximumIterations()
    • IsR1C1ReferenceStyle

      public bool IsR1C1ReferenceStyle()
      Returns the R1C1 reference style of the document.
      Returns:
      the R1C1 reference style of the document
      See Also:
      setR1C1ReferenceStyle(bool)
    • setR1C1ReferenceStyle

      public void setR1C1ReferenceStyle(bool isR1C1ReferenceStyle)
      Sets the R1C1 reference style of the document.
      Parameters:
      isR1C1ReferenceStyle - the R1C1 reference style of the document
      See Also:
      IsR1C1ReferenceStyle()
    • DisplayErrors

      public const bool DisplayErrors()
      Returns the flag that stores if the errors or the warnings are displayed on the console.
      Returns:
      true if the errors or the warnings are displayed on the console, false otherwise
      See Also:
      setDisplayErrors(bool)
    • setDisplayErrors

      public void setDisplayErrors(bool displayErrors)
      Sets the flag that stores if the errors or the warnings are displayed on the console.
      Parameters:
      displayErrors - true if the errors or the warnings are displayed on the console, false otherwise
      See Also:
      DisplayErrors()
    • setEncryptionOptions

      public void setEncryptionOptions(int encryptionType, System.String passwordToOpen)
      Sets the encryption options when a file is written and the document is encrypted.
      Parameters:
      encryptionType - the encryption type. Possible values are available in Encrypt class.
      passwordToOpen - the password required for opening the document
    • getEncryptionType

      public int getEncryptionType()
      Returns the encryption type. Possible values are available in Encrypt class.
      Returns:
      the encryption type
    • setPasswordToOpen

      public void setPasswordToOpen(System.String passwordToOpen)
      Sets the password required for opening the document. If a password is set, the document is encrypted.
      Parameters:
      passwordToOpen - the password required for opening the document
    • getPasswordToOpen

      public System.String getPasswordToOpen()
      Returns the password required for opening the document.
      Returns:
      the password required for opening the document
    • setPasswordToModify

      public void setPasswordToModify(System.String passwordToModify)
      Sets the password required for modifying the document.
      Parameters:
      passwordToModify - the password required for modifying the document
    • getPasswordToModify

      public System.String getPasswordToModify()
      Returns the password required for modifying the document.
      Returns:
      the password required for modifying the document
    • Clone

      public ExcelOptions Clone()
      Creates and returns a copy of this object.
      Returns:
      a clone of this instance.