menu

Document Processing

FormulaUtil Class - C# Excel Library API Reference | Syncfusion

    Show / Hide Table of Contents

    FormulaUtil Class

    This class provides functionality needed for formula parsing.

    Inheritance
    System.Object
    CommonObject
    FormulaUtil
    Implements
    IParentApplication
    System.IDisposable
    Inherited Members
    CommonObject.AddReference()
    CommonObject.AppImplementation
    CommonObject.Application
    CommonObject.CheckDisposed()
    CommonObject.Dispose()
    CommonObject.Finalize()
    CommonObject.FindParent(Object, Type)
    CommonObject.FindParent(Object, Type, Boolean)
    CommonObject.FindParent(Type)
    CommonObject.FindParent(Type, Boolean)
    CommonObject.FindParent(Type[])
    CommonObject.FindParents(Type[])
    CommonObject.m_bIsDisposed
    CommonObject.OnDispose()
    CommonObject.Parent
    CommonObject.ReferenceCount
    CommonObject.ReleaseReference()
    CommonObject.SetParent(Object)
    Namespace: Syncfusion.XlsIO.Implementation
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    public class FormulaUtil : CommonObject, IParentApplication, IDisposable

    Constructors

    FormulaUtil(IApplication, Object)

    Initializes new instance of the formula parsing utility.

    Declaration
    public FormulaUtil(IApplication application, object parent)
    Parameters
    Type Name Description
    IApplication application

    Application object.

    System.Object parent

    Parent object.

    FormulaUtil(IApplication, Object, NumberFormatInfo, Char, Char)

    Initializes new instance of the formula parsing utility.

    Declaration
    public FormulaUtil(IApplication application, object parent, NumberFormatInfo numberFormat, char chArgumentsSeparator, char chRowSeparator)
    Parameters
    Type Name Description
    IApplication application

    Application object.

    System.Object parent

    Parent object.

    System.Globalization.NumberFormatInfo numberFormat

    Number format information.

    System.Char chArgumentsSeparator

    Argument separator.

    System.Char chRowSeparator

    Row separator.

    Fields

    Cell3DRegex

    Regular expression for 3d reference detection.

    Declaration
    public static readonly Regex Cell3DRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellR1C13DRegex

    Regular expression for 3d reference detection in R1C1 notation.

    Declaration
    public static readonly Regex CellR1C13DRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellR1C1Regex

    Regular expression for checking if specified string is cell reference.

    Declaration
    public static readonly Regex CellR1C1Regex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRange3DRegex

    Regular expression for 3d cell range detection.

    Declaration
    public static readonly Regex CellRange3DRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRange3DRegex2

    Regular expression for 3d cell range detection second possible case.

    Declaration
    public static readonly Regex CellRange3DRegex2
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRangeR1C13DRegex

    Regular expression for 3d cell range detection.

    Declaration
    public static readonly Regex CellRangeR1C13DRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRangeR1C13DRegex2

    Regular expression for 3d cell range detection second possible case.

    Declaration
    public static readonly Regex CellRangeR1C13DRegex2
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRangeR1C13DShortRegex

    Regular expression for checking if specified string is cell range in R1C1 notation.

    Declaration
    public static readonly Regex CellRangeR1C13DShortRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRangeR1C1Regex

    Regular expression for checking if specified string is cell range in R1C1 notation.

    Declaration
    public static readonly Regex CellRangeR1C1Regex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRangeR1C1ShortRegex

    Regular expression for checking if specified string is cell range in R1C1 notation.

    Declaration
    public static readonly Regex CellRangeR1C1ShortRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRangeRegex

    Regular expression for checking if specified string is cell range.

    Declaration
    public static readonly Regex CellRangeRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellReferenceRegex

    Regular expression for checking if specified string is cell reference.

    Declaration
    public static readonly Regex CellReferenceRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CellRegex

    Regular expression for checking if specified string is cell reference.

    Declaration
    public static readonly Regex CellRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    CloseBrackets

    T corresponding close brackets.

    Declaration
    public static char[] CloseBrackets
    Field Value
    Type
    System.Char[]

    DEF_ARRAY_INDEX

    Default reference index for array token.

    Declaration
    public const int DEF_ARRAY_INDEX = 2
    Field Value
    Type
    System.Int32

    DEF_BOOKNAME_GROUP

    Name of the book name group.

    Declaration
    public const string DEF_BOOKNAME_GROUP = "BookName"
    Field Value
    Type
    System.String

    DEF_COLUMN_GROUP

    Name of the first column name group.

    Declaration
    public const string DEF_COLUMN_GROUP = "Column1"
    Field Value
    Type
    System.String

    DEF_GROUP_COLUMN1

    Column of the first cell.

    Declaration
    public const string DEF_GROUP_COLUMN1 = "Column1"
    Field Value
    Type
    System.String

    DEF_GROUP_COLUMN2

    Column of the second cell.

    Declaration
    public const string DEF_GROUP_COLUMN2 = "Column2"
    Field Value
    Type
    System.String

    DEF_GROUP_ROW1

    Row of the first cell.

    Declaration
    public const string DEF_GROUP_ROW1 = "Row1"
    Field Value
    Type
    System.String

    DEF_GROUP_ROW2

    Row of the second cell.

    Declaration
    public const string DEF_GROUP_ROW2 = "Row2"
    Field Value
    Type
    System.String

    DEF_NAME_INDEX

    Default index inside named range formula.

    Declaration
    public const int DEF_NAME_INDEX = 1
    Field Value
    Type
    System.Int32

    DEF_PATH_GROUP

    Name of the path group.

    Declaration
    public const string DEF_PATH_GROUP = "Path"
    Field Value
    Type
    System.String

    DEF_RANGENAME_GROUP

    Name of the range name group.

    Declaration
    public const string DEF_RANGENAME_GROUP = "RangeName"
    Field Value
    Type
    System.String

    DEF_REFERENCE_INDEX

    Default reference index.

    Declaration
    public const int DEF_REFERENCE_INDEX = 2
    Field Value
    Type
    System.Int32

    DEF_ROW_GROUP

    Name of the first row name group.

    Declaration
    public const string DEF_ROW_GROUP = "Row1"
    Field Value
    Type
    System.String

    DEF_SHEETNAME_GROUP

    Name of the sheet name group.

    Declaration
    public const string DEF_SHEETNAME_GROUP = "SheetName"
    Field Value
    Type
    System.String

    ErrorNameToConstructor

    Provides access to constructor that takes one string argument by name of the error.

    Declaration
    public static Dictionary<string, ConstructorInfo> ErrorNameToConstructor
    Field Value
    Type
    System.Collections.Generic.Dictionary<System.String, System.Reflection.ConstructorInfo>

    Excel2010FunctionPrefix

    Represents the Excel2010 function prefix

    Declaration
    public const string Excel2010FunctionPrefix = "_xlfn."
    Field Value
    Type
    System.String

    Full3DColumnRangeRegex

    Regular expression for checking if specified string is 3D full column range.

    Declaration
    public static readonly Regex Full3DColumnRangeRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    Full3DRowRangeRegex

    Regular expression for checking if specified string is 3D full row range.

    Declaration
    public static readonly Regex Full3DRowRangeRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    FullColumnRangeR1C1Regex

    Regular expression for checking if specified string is full column range in R1C1 notation.

    Declaration
    public static readonly Regex FullColumnRangeR1C1Regex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    FullColumnRangeRegex

    Regular expression for checking if specified string is full column range.

    Declaration
    public static readonly Regex FullColumnRangeRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    FullRowRangeR1C1Regex

    Regular expression for checking if specified string is full row range in R1C1 notation

    Declaration
    public static readonly Regex FullRowRangeR1C1Regex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    FullRowRangeRegex

    Regular expression for checking if specified string is full row range.

    Declaration
    public static readonly Regex FullRowRangeRegex
    Field Value
    Type
    System.Text.RegularExpressions.Regex

    FunctionAliasToId

    Provides access to function id by its name.

    Declaration
    public static Dictionary<string, ExcelFunction> FunctionAliasToId
    Field Value
    Type
    System.Collections.Generic.Dictionary<System.String, ExcelFunction>

    FunctionIdToAlias

    Gives access to the function name by its id.

    Declaration
    public static Dictionary<ExcelFunction, string> FunctionIdToAlias
    Field Value
    Type
    System.Collections.Generic.Dictionary<ExcelFunction, System.String>

    FunctionIdToIndex

    Provides access to Dictionary that contains all Reference index by type of the argument token.

    Declaration
    public static Dictionary<ExcelFunction, Dictionary<Type, ReferenceIndexAttribute>> FunctionIdToIndex
    Field Value
    Type
    System.Collections.Generic.Dictionary<ExcelFunction, System.Collections.Generic.Dictionary<System.Type, Syncfusion.XlsIO.Parser.Biff_Records.Formula.ReferenceIndexAttribute>>

    FunctionIdToParamCount

    Gives access to the number of parameter needed by the function.

    Declaration
    public static Dictionary<ExcelFunction, int> FunctionIdToParamCount
    Field Value
    Type
    System.Collections.Generic.Dictionary<ExcelFunction, System.Int32>

    NameCodes

    Declaration
    public static FormulaToken[] NameCodes
    Field Value
    Type
    Syncfusion.XlsIO.Parser.Biff_Records.Formula.FormulaToken[]

    NameXCodes

    Declaration
    public static FormulaToken[] NameXCodes
    Field Value
    Type
    Syncfusion.XlsIO.Parser.Biff_Records.Formula.FormulaToken[]

    OpenBrackets

    Array of all open brackets.

    Declaration
    public static char[] OpenBrackets
    Field Value
    Type
    System.Char[]

    PlusMinusArray

    Plus and minus signs.

    Declaration
    public static string[] PlusMinusArray
    Field Value
    Type
    System.String[]

    StringBrackets

    String 'brackets'.

    Declaration
    public static char[] StringBrackets
    Field Value
    Type
    System.Char[]

    UnaryOperations

    All known unary operations.

    Declaration
    public static string[] UnaryOperations
    Field Value
    Type
    System.String[]

    Properties

    ArrayRowSeparator

    Returns array row separator. Read-only.

    Declaration
    public string ArrayRowSeparator { get; }
    Property Value
    Type
    System.String

    ErrorCodeToName

    Returns IDictionary error code - to - name. Read-only.

    Declaration
    public static Dictionary<int, string> ErrorCodeToName { get; }
    Property Value
    Type
    System.Collections.Generic.Dictionary<System.Int32, System.String>

    ErrorNameToCode

    Returns IDictionary error name - to - error code. Read-only.

    Declaration
    public static Dictionary<string, int> ErrorNameToCode { get; }
    Property Value
    Type
    System.Collections.Generic.Dictionary<System.String, System.Int32>

    NumberFormat

    Gets or sets number format for parsing double value.

    Declaration
    public NumberFormatInfo NumberFormat { get; set; }
    Property Value
    Type
    System.Globalization.NumberFormatInfo

    OperandsSeparator

    Returns operands separator. Read-only.

    Declaration
    public string OperandsSeparator { get; }
    Property Value
    Type
    System.String

    ParentWorkbook

    Declaration
    public IWorkbook ParentWorkbook { get; }
    Property Value
    Type
    IWorkbook

    Methods

    add_FormulaEvaluator(EvaluateEventHandler)

    Declaration
    public static void add_FormulaEvaluator(EvaluateEventHandler value)
    Parameters
    Type Name Description
    Syncfusion.XlsIO.Implementation.EvaluateEventHandler value

    CreateError(String, Int32)

    Creates token that describes specified error.

    Declaration
    public static Ptg CreateError(string strFormula, int errorIndex)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string that contains error string.

    System.Int32 errorIndex

    Index of the error name.

    Returns
    Type Description
    Syncfusion.XlsIO.Parser.Biff_Records.Formula.Ptg

    Created token that contains error.

    FindCorrespondingBracket(String, Int32)

    Searches for position of corresponding bracket.

    Declaration
    public static int FindCorrespondingBracket(string strFormula, int BracketPos)
    Parameters
    Type Name Description
    System.String strFormula

    String to search.

    System.Int32 BracketPos

    Position of bracket( "(){}" ).

    Returns
    Type Description
    System.Int32

    Position of corresponding bracket if there is one, otherwise -1.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    When specified position does not contain bracket.

    GetFunctionOperand(String, Int32)

    Extracts function operand from formula string.

    Declaration
    public string GetFunctionOperand(string strFormula, int iFirstChar)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string to extract operand from.

    System.Int32 iFirstChar

    First character of the operand.

    Returns
    Type Description
    System.String

    Extracted operand.

    GetLeftBinaryOperand(String, Int32)

    Returns left operand for binary operation.

    Declaration
    public static string GetLeftBinaryOperand(string strFormula, int OpIndex)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string.

    System.Int32 OpIndex

    Index of operation.

    Returns
    Type Description
    System.String

    Left operand for specified operation.

    GetLeftUnaryOperand(String, Int32)

    Returns operand that is placed before unary operation.

    Declaration
    public string GetLeftUnaryOperand(string strFormula, int OpIndex)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string that contains operand and unary operation.

    System.Int32 OpIndex

    Index of unary operation in the string.

    Returns
    Type Description
    System.String

    Left operand of the specified unary operation.

    GetOperand(String, Int32, SortedList, Boolean)

    Returns operand of the operation.

    Declaration
    public static string GetOperand(string strFormula, int OpIndex, SortedList arrBreakStrings, bool IsLeft)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string that contains operation and operands.

    System.Int32 OpIndex

    Index of the operation.

    System.Collections.SortedList arrBreakStrings

    Delimiters between operands.

    System.Boolean IsLeft

    Search direction (TRUE -right to left, FALSE - left to right).

    Returns
    Type Description
    System.String

    Operand defined by function parameters.

    Exceptions
    Type Condition
    System.ArgumentException

    When a open bracket is found without a corresponding closing bracket.

    GetRightBinaryOperand(String, Int32, String)

    Returns right operand for binary operation.

    Declaration
    public string GetRightBinaryOperand(string strFormula, int iFirstChar, string operation)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string.

    System.Int32 iFirstChar

    Index of first operand character.

    System.String operation

    String with operation.

    Returns
    Type Description
    System.String

    Right operand for the specified operation.

    GetRightUnaryOperand(String, Int32)

    Returns operand that is placed after unary operation.

    Declaration
    public string GetRightUnaryOperand(string strFormula, int OpIndex)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string that contains operation and operand.

    System.Int32 OpIndex

    Index of the operation.

    Returns
    Type Description
    System.String

    Right operand of the specified unary operation.

    IndexOf(ExcelFunction[], ExcelFunction)

    Searches for the specified object and returns the index of the first occurrence within the entire one-dimensional array.

    Declaration
    public static int IndexOf(ExcelFunction[] array, ExcelFunction value)
    Parameters
    Type Name Description
    ExcelFunction[] array

    Array to search.

    ExcelFunction value

    Value to locate in the array.

    Returns
    Type Description
    System.Int32

    The index of the first occurrence of value within the entire array, if found; otherwise, -1.

    IndexOf(String[], String)

    Searches for the specified object and returns the index of the first occurrence within the entire one-dimensional array.

    Declaration
    public static int IndexOf(string[] array, string value)
    Parameters
    Type Name Description
    System.String[] array

    Array to search.

    System.String value

    Value to locate in the array.

    Returns
    Type Description
    System.Int32

    The index of the first occurrence of value within the entire array, if found; otherwise, -1.

    IsCell(String, Boolean, out String, out String)

    Indicates if specified string is cell name.

    Declaration
    public static bool IsCell(string strFormula, bool bR1C1, out string strRow, out string strColumn)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string that will be checked.

    System.Boolean bR1C1

    Indicates whether R1C1 notation must be used.

    System.String strRow

    String representation of the row.

    System.String strColumn

    String representation of the column.

    Returns
    Type Description
    System.Boolean

    True if parameter is cell name, i.e. "A1", False otherwise.

    IsCell3D(String, Boolean, out String, out String, out String)

    Indicates if specified strings is 3d cell reference.

    Declaration
    public static bool IsCell3D(string strFormula, bool bR1C1, out string strSheetName, out string strRow, out string strColumn)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string that will be checked.

    System.Boolean bR1C1

    Indicates whether R1C1 notation must be used.

    System.String strSheetName

    Name of the worksheet if succeeded; otherwise - NULL.

    System.String strRow

    String representation of the row part of the cell reference.

    System.String strColumn

    String representation of the column part of the cell reference.

    Returns
    Type Description
    System.Boolean

    True if parameter is 3d cell reference, i.e. "Sheet1!A1", False otherwise.

    IsCellRange(String, Boolean, out String, out String, out String, out String)

    Indicates if specified string is cell range.

    Declaration
    public bool IsCellRange(string strFormula, bool bR1C1, out string strRow1, out string strColumn1, out string strRow2, out string strColumn2)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string that will be checked.

    System.Boolean bR1C1

    Indicates whether R1C1 notation must be used.

    System.String strRow1

    The first cell's row.

    System.String strColumn1

    The first cell's column.

    System.String strRow2

    The second cell's row.

    System.String strColumn2

    The second cell's column

    Returns
    Type Description
    System.Boolean

    True if parameter is cell range, i.e. "A1:D1", False otherwise.

    IsCellRange3D(String, Boolean, out String, out String, out String, out String, out String)

    Indicates whether specified string is 3d cell range.

    Declaration
    public bool IsCellRange3D(string strFormula, bool bR1C1, out string strSheetName, out string strRow1, out string strColumn1, out string strRow2, out string strColumn2)
    Parameters
    Type Name Description
    System.String strFormula

    String that should be checked.

    System.Boolean bR1C1

    Indicates whether R1C1 notation must be used.

    System.String strSheetName

    String that initialize by current sheet name.

    System.String strRow1

    String representation of the row part of the first cell reference.

    System.String strColumn1

    String representation of the column part of the first cell reference.

    System.String strRow2

    String representation of the row part of the second cell reference.

    System.String strColumn2

    String representation of the column part of the second cell reference.

    Returns
    Type Description
    System.Boolean

    True if string is 3d cell range.

    IsExcel2007Function(ExcelFunction)

    Indicates whether specified function is supported just in Excel 2007.

    Declaration
    public static bool IsExcel2007Function(ExcelFunction functionIndex)
    Parameters
    Type Name Description
    ExcelFunction functionIndex

    Function id.

    Returns
    Type Description
    System.Boolean

    Value indicating whether specified function appeared in Excel 2007.

    IsExcel2010Function(ExcelFunction)

    Indicates whether specified function is supported just in Excel 2010.

    Declaration
    public static bool IsExcel2010Function(ExcelFunction functionIndex)
    Parameters
    Type Name Description
    ExcelFunction functionIndex

    Function id.

    Returns
    Type Description
    System.Boolean

    Value indicating whether specified function appeared in Excel 2010.

    IsExcel2013Function(ExcelFunction)

    Indicates whether specified function is supported just in Excel 2013.

    Declaration
    public static bool IsExcel2013Function(ExcelFunction functionIndex)
    Parameters
    Type Name Description
    ExcelFunction functionIndex

    Function id.

    Returns
    Type Description
    System.Boolean

    Value indicating whether specified function appeared in Excel 2013.

    IsExcel2016Function(ExcelFunction)

    Indicates whether specified function is supported just in Excel 2016.

    Declaration
    public static bool IsExcel2016Function(ExcelFunction functionIndex)
    Parameters
    Type Name Description
    ExcelFunction functionIndex

    Function id.

    Returns
    Type Description
    System.Boolean

    Value indicating whether specified function appeared in Excel 2016.

    ParseSharedString(String, Int32, Int32, IWorksheet)

    Converts string to shared formula token array.

    Declaration
    public Ptg[] ParseSharedString(string strFormula, int iFirstRow, int iFirstColumn, IWorksheet sheet)
    Parameters
    Type Name Description
    System.String strFormula

    Represents formula string.

    System.Int32 iFirstRow

    Represents first row from cells range. One-based.

    System.Int32 iFirstColumn

    Represents first column from cells range. One-based.

    IWorksheet sheet

    Parent worksheet object.

    Returns
    Type Description
    Syncfusion.XlsIO.Parser.Biff_Records.Formula.Ptg[]

    Shared formula tokens.

    ParseString(String)

    Converts string to token array.

    Declaration
    public Ptg[] ParseString(string strFormula)
    Parameters
    Type Name Description
    System.String strFormula

    String that should be parsed into Ptg array.

    Returns
    Type Description
    Syncfusion.XlsIO.Parser.Biff_Records.Formula.Ptg[]

    Token array representing specified string.

    Exceptions
    Type Condition
    System.ArgumentException

    When any error occurs in the specified formula string.

    ParseString(String, IWorksheet, Dictionary<String, String>)

    Converts string to token array. Used when copying worksheets into another workbook.

    Declaration
    public Ptg[] ParseString(string strFormula, IWorksheet sheet, Dictionary<string, string> hashWorksheetNames)
    Parameters
    Type Name Description
    System.String strFormula

    String that should be parsed into Ptg array.

    IWorksheet sheet

    Parent sheet.

    System.Collections.Generic.Dictionary<System.String, System.String> hashWorksheetNames

    Dictionary that contains old name of the worksheet as a key and new name of the worksheet as value.

    Returns
    Type Description
    Syncfusion.XlsIO.Parser.Biff_Records.Formula.Ptg[]

    Token array representing specified string.

    Exceptions
    Type Condition
    System.ArgumentException

    When any error occurs in the specified formula string.

    ParseString(String, IWorksheet, Dictionary<String, String>, Int32, Int32, Boolean)

    Converts string to token array. Used when copying worksheets into another workbook.

    Declaration
    public Ptg[] ParseString(string strFormula, IWorksheet sheet, Dictionary<string, string> hashWorksheetNames, int iCellRow, int iCellColumn, bool bR1C1)
    Parameters
    Type Name Description
    System.String strFormula

    String that should be parsed into Ptg array.

    IWorksheet sheet

    Parent sheet.

    System.Collections.Generic.Dictionary<System.String, System.String> hashWorksheetNames

    Dictionary that contains old name of the worksheet as a key and new name of the worksheet as value.

    System.Int32 iCellRow

    Row index of the cell that contains formula to parse.

    System.Int32 iCellColumn

    Column index of the cell that contains formula to parse.

    System.Boolean bR1C1

    Indicates whether R1C1 notation is used.

    Returns
    Type Description
    Syncfusion.XlsIO.Parser.Biff_Records.Formula.Ptg[]

    Token array representing specified string.

    Exceptions
    Type Condition
    System.ArgumentException

    When any error occurs in the specified formula string.

    PushOperandToStack(Stack<Object>, String)

    Pushes operand into stack correctly.

    Declaration
    public static void PushOperandToStack(Stack<object> operands, string operand)
    Parameters
    Type Name Description
    System.Collections.Generic.Stack<System.Object> operands
    System.String operand

    RaiseFormulaEvaluation(Object, EvaluateEventArgs)

    This method raises the FormulaEvaluation event.

    Declaration
    public static void RaiseFormulaEvaluation(object sender, EvaluateEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    Range that caused FormulaEvaluation event.

    EvaluateEventArgs e

    Object that contains event arguments.

    RegisterAdditionalAlias(String, ExcelFunction)

    Registers new function alias.

    Declaration
    public static void RegisterAdditionalAlias(string aliasName, ExcelFunction functionIndex)
    Parameters
    Type Name Description
    System.String aliasName

    New alias name.

    ExcelFunction functionIndex

    Function index.

    RegisterFunction(String, ExcelFunction)

    Registers function in internal collections.

    Declaration
    public static void RegisterFunction(string functionName, ExcelFunction index)
    Parameters
    Type Name Description
    System.String functionName

    Name of the function that must be registered.

    ExcelFunction index

    Index of the function that must be registered.

    RegisterFunction(String, ExcelFunction, Int32)

    Registers function in internal collections.

    Declaration
    public static void RegisterFunction(string functionName, ExcelFunction index, int paramCount)
    Parameters
    Type Name Description
    System.String functionName

    Name of the function that must be registered.

    ExcelFunction index

    Index of the function that must be registered.

    System.Int32 paramCount

    Number of parameter in the function, -1, for variable parameters number.

    RegisterTokenClass(Type)

    Registers token class (can be user defined).

    Declaration
    public static void RegisterTokenClass(Type type)
    Parameters
    Type Name Description
    System.Type type

    Token class that will be registered.

    Exceptions
    Type Condition
    System.ArgumentException

    When class is not derived from Ptg.

    System.ArgumentNullException

    When parameter type is NULL.

    remove_FormulaEvaluator(EvaluateEventHandler)

    Declaration
    public static void remove_FormulaEvaluator(EvaluateEventHandler value)
    Parameters
    Type Name Description
    Syncfusion.XlsIO.Implementation.EvaluateEventHandler value

    SetSeparators(Char, Char)

    Sets separators.

    Declaration
    public void SetSeparators(char operandsSeparator, char arrayRowsSeparator)
    Parameters
    Type Name Description
    System.Char operandsSeparator

    Operand separator to set.

    System.Char arrayRowsSeparator

    Array rows separator to set.

    SplitArray(String, String)

    Splits array. Each string in result represents single row of the array.

    Declaration
    public List<string> SplitArray(string strFormula, string strSeparator)
    Parameters
    Type Name Description
    System.String strFormula

    Array string to split.

    System.String strSeparator

    Separator

    Returns
    Type Description
    System.Collections.Generic.List<System.String>

    Splitted array.

    Events

    FormulaEvaluator

    Event handler that will receive array of Ptg after parsing.

    Declaration
    public static event EvaluateEventHandler FormulaEvaluator
    Event Type
    Type
    Syncfusion.XlsIO.Implementation.EvaluateEventHandler

    Implements

    IParentApplication
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved