Namespace EasyXLS.Util

Class FormulaResult

System.Object
EasyXLS.Util.FormulaResult

public class FormulaResult extends System.Object
This class stores the result of a formula. The result of a formula has 3 properties extends - the result itself as a string object; - the data type of the result (one of the data types from DataType class); - the number format that must be applied on the result when result is set as a value for a cell (any number format Excel recognizes).
  • Constructor Summary

    Constructors
    Constructor
    Description
    FormulaResult​(System.String text, System.String dataType, System.String numberFormat, bool isHyperlink, System.String linkLocation)
    Defines an instance of the Excel formula result.
  • Method Summary

    Modifier and Type
    Method
    Description
    System.String
    Returns the formula data type.
    System.String
    Returns the link location (such as http://www.google.ro/) if the formula is a hyperlink.
    System.String
    Returns the formula number format.
    bool
    Returns whether the formula result is a hyperlink.
    System.String
    Returns the formula result as a string.

    Methods inherited from class System.Object

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

    • FormulaResult

      public FormulaResult(System.String text, System.String dataType, System.String numberFormat, bool isHyperlink, System.String linkLocation)
      Defines an instance of the Excel formula result.
      Parameters:
      text - the value of the formula result.
      dataType - the data type of the formula result. Possible values are available in DataType class.
      numberFormat - the number format of the formula result (e.g. 0.00, MM/dd/yyyy).
      isHyperlink - true if the result represents a hyperlink.
      linkLocation - link location (such as http://www.google.ro/) if the formula is a hyperlink.
  • Method Details

    • toString

      public System.String toString()
      Returns the formula result as a string.
      Overrides:
      toString in class System.Object
      Returns:
      the formula result as a string.
    • getNumberFormat

      public System.String getNumberFormat()
      Returns the formula number format.
      Returns:
      the number format of the formula.
    • getDataType

      public System.String getDataType()
      Returns the formula data type.
      Returns:
      the data type of the formula.
    • isHyperlink

      public bool isHyperlink()
      Returns whether the formula result is a hyperlink.
      Returns:
      true if the formula result is a hyperlink, false otherwise.
    • getLinkLocation

      public System.String getLinkLocation()
      Returns the link location (such as http://www.google.ro/) if the formula is a hyperlink.
      Returns:
      the link location if the formula result is a hyperlink.