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 -
Method Summary
Modifier and TypeMethodDescriptionconst int[]get2DCellElements(System.String sCellReference) Returns an array of integers containing the elements of the specifiedsCellReferenceconst int[]get2DRangeElements(System.String sRange) Returns an array of integers containing the elements of the specifiedsRangeconst System.String[]get3DCellElements(System.String sCellReference) Returns an array of objects containing the elements of the specifiedsCellReferenceconst ListgetTokens(System.String formula) Returns a list of tokens after parsing a formula definitionconst boolIsUnsignedInteger(System.String sValue) Returns true if thesValuerepresents 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 specifiedsCellReference- 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 specifiedsCellReference- 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 specifiedsRange- 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 thesValuerepresents an unsigned integer value.- Parameters:
sValue- the value to be checked- Returns:
- true if the value represents an unsigned integer value.
-
getTokens
Returns a list of tokens after parsing a formula definition- Parameters:
formula- the formula to be parsed- Returns:
- a list of string tokens
-