menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class FunctionPtg - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class FunctionPtg

    This class represents function token of a formula.

    Inheritance
    System.Object
    Ptg
    OperationPtg
    FunctionPtg
    FunctionVarPtg
    Implements
    System.ICloneable
    Inherited Members
    OperationPtg.GetOperandsSeparator(FormulaUtil)
    OperationPtg.IsOperation
    OperationPtg.IsPlaceAfter
    OperationPtg.NumberOfOperands
    OperationPtg.OperationSymbol
    OperationPtg.PushResultToStack(Stack<Object>)
    OperationPtg.UpdateParseOptions(ExcelParseFormulaOptions)
    Ptg.Clone()
    Ptg.CompareArrays(Ptg[], Ptg[])
    Ptg.CompareContent(Ptg)
    Ptg.CompareTo(Ptg)
    Ptg.ConvertPtgToNPtg(IWorkbook, Int32, Int32)
    Ptg.ConvertSharedToken(IWorkbook, Int32, Int32)
    Ptg.GetString16Bit(Byte[], Int32)
    Ptg.GetString16Bit(Byte[], Int32, Int32)
    Ptg.IndexToCode(FormulaToken, Int32)
    Ptg.Offset(Int32, Int32, Int32, Int32, Rectangle, Int32, Rectangle, Boolean, WorkbookImpl)
    Ptg.Offset(Int32, Int32, WorkbookImpl)
    Ptg.RectangleContains(Rectangle, Int32, Int32)
    Ptg.TokenCode
    Ptg.ToString()
    Ptg.ToString(FormulaUtil)
    Ptg.ToString(FormulaUtil, Int32, Int32, Boolean)
    Ptg.ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo)
    Ptg.ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo, Boolean, IWorksheet)
    Ptg.ToString(Int32, Int32, Boolean)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    [Token(FormulaToken.tFunction1)]
    [Token(FormulaToken.tFunction2)]
    [Token(FormulaToken.tFunction3)]
    [CLSCompliant(false)]
    public class FunctionPtg : OperationPtg, ICloneable

    Constructors

    FunctionPtg()

    Default constructor

    Declaration
    public FunctionPtg()

    FunctionPtg(ExcelFunction)

    Constructs token by function index.

    Declaration
    public FunctionPtg(ExcelFunction index)
    Parameters
    Type Name Description
    ExcelFunction index

    Function index.

    FunctionPtg(DataProvider, Int32, ExcelVersion)

    Constructs token using data from byte array.

    Declaration
    public FunctionPtg(DataProvider provider, int offset, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider provider

    Object that provides access to the data.

    System.Int32 offset

    Offset to token data.

    ExcelVersion version

    Excel version that was used to infill data provider.

    FunctionPtg(String)

    Constructs function token by function name.

    Declaration
    public FunctionPtg(string strFunctionName)
    Parameters
    Type Name Description
    System.String strFunctionName

    Valid function name.

    Fields

    OperandsDelimiter

    Delimiter between function arguments.

    Declaration
    public const string OperandsDelimiter = ","
    Field Value
    Type
    System.String

    Properties

    Attributes

    Array of all token attributes applied to the object. This property is used to increase performance.

    Declaration
    protected override TokenAttribute[] Attributes { get; }
    Property Value
    Type
    TokenAttribute[]
    Overrides
    OperationPtg.Attributes

    FunctionIndex

    Returns built-in function index.

    Declaration
    public ExcelFunction FunctionIndex { get; set; }
    Property Value
    Type
    ExcelFunction

    NumberOfArguments

    Number of function arguments.

    Declaration
    public byte NumberOfArguments { get; set; }
    Property Value
    Type
    System.Byte

    OperationType

    Read-only. Type of operation (TYPE_FUNCTION for all functions).

    Declaration
    public override TOperation OperationType { get; }
    Property Value
    Type
    TOperation
    Overrides
    OperationPtg.OperationType

    Methods

    GetOperands(String, ref Int32, FormulaUtil)

    Gets operands from string and returns array of string representation of the operands.

    Declaration
    public override string[] GetOperands(string strFormula, ref int index, FormulaUtil formulaParser)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string.

    System.Int32 index

    Index of the function in the formula string.

    FormulaUtil formulaParser

    Formula parser.

    Returns
    Type Description
    System.String[]

    Array of strings that contains function operands.

    Overrides
    OperationPtg.GetOperands(String, ref Int32, FormulaUtil)

    GetOperands(String, ref Int32, Boolean, FormulaUtil)

    Gets operands from string and returns array of string representation of the operands.

    Declaration
    protected string[] GetOperands(string strFormula, ref int index, bool checkParamCount, FormulaUtil formulaParser)
    Parameters
    Type Name Description
    System.String strFormula

    Formula string.

    System.Int32 index

    Index to built-in function.

    System.Boolean checkParamCount

    True if function should check operands count.

    FormulaUtil formulaParser

    Formula parser.

    Returns
    Type Description
    System.String[]

    Array of strings that contain function operands.

    Exceptions
    Type Condition
    System.ArgumentException

    if checkParamCount = True and actual parameter count does not equal expected

    GetSize(ExcelVersion)

    Read-only. Size of the token.

    Declaration
    public override int GetSize(ExcelVersion version)
    Parameters
    Type Name Description
    ExcelVersion version
    Returns
    Type
    System.Int32
    Overrides
    Ptg.GetSize(ExcelVersion)

    IndexToCode(Int32)

    Declaration
    public static FormulaToken IndexToCode(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type
    FormulaToken

    InfillPTG(DataProvider, ref Int32, ExcelVersion)

    Infill PTG structure.

    Declaration
    public override void InfillPTG(DataProvider provider, ref int offset, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider provider

    Represents storage.

    System.Int32 offset

    Offset in storage.

    ExcelVersion version

    Excel version that was used to infill data provider.

    Overrides
    OperationPtg.InfillPTG(DataProvider, ref Int32, ExcelVersion)

    PushResultToStack(FormulaUtil, Stack<Object>, Boolean)

    Converts the operation and its operands to the string. Gets all needed operands from the Stack parameter and pushes the result into the Stack.

    Declaration
    public override void PushResultToStack(FormulaUtil formulaUtil, Stack<object> operands, bool isForSerialization)
    Parameters
    Type Name Description
    FormulaUtil formulaUtil

    Object used for formula parsing.

    System.Collections.Generic.Stack<System.Object> operands

    Stack that contains all operands and receives result of the operation.

    System.Boolean isForSerialization
    Overrides
    OperationPtg.PushResultToStack(FormulaUtil, Stack<Object>, Boolean)

    ToByteArray(ExcelVersion)

    Converts token to byte array.

    Declaration
    public override byte[] ToByteArray(ExcelVersion version)
    Parameters
    Type Name Description
    ExcelVersion version
    Returns
    Type Description
    System.Byte[]

    Array of bytes representing this token.

    Overrides
    Ptg.ToByteArray(ExcelVersion)

    ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo, Boolean)

    Converts token to a string.

    Declaration
    public override string ToString(FormulaUtil formulaUtil, int iRow, int iColumn, bool bR1C1, NumberFormatInfo numberFormat, bool isForSerialization)
    Parameters
    Type Name Description
    FormulaUtil formulaUtil

    Formula util.

    System.Int32 iRow

    Zero-based row index of the cell that contains this token.

    System.Int32 iColumn

    Zero-based row index of the cell that contains this token.

    System.Boolean bR1C1

    Indicates whether R1C1 notation should be used.

    System.Globalization.NumberFormatInfo numberFormat
    System.Boolean isForSerialization
    Returns
    Type Description
    System.String

    String representation of this token.

    Overrides
    OperationPtg.ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo, Boolean)

    Implements

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