Namespace EasyXLS.Util

Class FormulaParser

System.Object
EasyXLS.Util.FormulaParser

public class FormulaParser extends System.Object
This class contains useful methods for parsing formulas.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    const int[]
    get2DCellElements​(System.String sCellReference)
    Returns an array of integers containing the elements of the specified sCellReference
    const int[]
    get2DRangeElements​(System.String sRange)
    Returns an array of integers containing the elements of the specified sRange
    const System.String[]
    get3DCellElements​(System.String sCellReference)
    Returns an array of objects containing the elements of the specified sCellReference
    const List
    getTokens​(System.String formula)
    Returns a list of tokens after parsing a formula definition
    const bool
    IsUnsignedInteger​(System.String sValue)
    Returns true if the sValue represents an unsigned integer value.

    Methods inherited from class System.Object

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

    • FormulaParser

      public FormulaParser()
  • Method Details

    • get2DCellElements

      public const int[] get2DCellElements(System.String sCellReference)
      Returns an array of integers containing the elements of the specified sCellReference
      Parameters:
      sCellReference - the range whose elements will be returned.
      Returns:
      int[0] - the number of the column; int[1] - the number of the row; int[2] - 1 if is absolute column; int[3] - 1 if is absolute row;
    • get3DCellElements

      public const System.String[] get3DCellElements(System.String sCellReference)
      Returns an array of objects containing the elements of the specified sCellReference
      Parameters:
      sCellReference - the range whose elements will be returned.
      Returns:
      String[0] - sheet name; String[1] - the number of the column; String[2] - the number of the row; String[3] - 1 if is absolute column; String[4] - 1 if is absolute row;
    • get2DRangeElements

      public const int[] get2DRangeElements(System.String sRange)
      Returns an array of integers containing the elements of the specified sRange
      Parameters:
      sRange - the range whose elements will be returned.
      Returns:
      int[0] - the number of the first column; int[1] - the number of the first row; int[2] - the number of the second column; int[3] - the number of the second row. int[4] - 1 if is absolute first column; int[5] - 1 if is absolute first row; int[6] - 1 if is absolute second column; int[7] - 1 if is absolute second row;
    • IsUnsignedInteger

      public const bool IsUnsignedInteger(System.String sValue)
      Returns true if the sValue represents an unsigned integer value.
      Parameters:
      sValue - the value to be checked
      Returns:
      true if the value represents an unsigned integer value.
    • getTokens

      public const List getTokens(System.String formula)
      Returns a list of tokens after parsing a formula definition
      Parameters:
      formula - the formula to be parsed
      Returns:
      a list of string tokens