Class FunctionVarPtg
This class represents function with variable arguments number in a formula.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
[Token(FormulaToken.tFunctionVar1)]
[Token(FormulaToken.tFunctionVar2)]
[Token(FormulaToken.tFunctionVar3)]
[CLSCompliant(false)]
public class FunctionVarPtg : FunctionPtg, ICloneable
Constructors
FunctionVarPtg()
Default constructor
Declaration
public FunctionVarPtg()
FunctionVarPtg(ExcelFunction)
Constructs token by built-in function index.
Declaration
public FunctionVarPtg(ExcelFunction funcIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelFunction | funcIndex | Built-in function index. |
FunctionVarPtg(DataProvider, int, ExcelVersion)
Constructs token using data from byte array.
Declaration
public FunctionVarPtg(DataProvider provider, int offset, ExcelVersion version)
Parameters
| Type | Name | Description |
|---|---|---|
| DataProvider | provider | Object that provides access to the data. |
| int | offset | Offset to the token data. |
| ExcelVersion | version | Excel version that was used to infill data provider. |
FunctionVarPtg(string)
Constructs function token by function name.
Declaration
public FunctionVarPtg(string strFunctionName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | strFunctionName | Valid function name. |
Methods
GetOperands(string, ref int, 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 |
|---|---|---|
| string | strFormula | Formula string. |
| int | index | Index of function in the string. |
| FormulaUtil | formulaParser | Formula parser. |
Returns
| Type | Description |
|---|---|
| string[] | Array of strings containing function parameters. |
Overrides
GetSize(ExcelVersion)
Read-only. Size of the token.
Declaration
public override int GetSize(ExcelVersion version)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelVersion | version |
Returns
| Type |
|---|
| int |
Overrides
IndexToCode(int)
Declaration
public static FormulaToken IndexToCode(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Returns
| Type |
|---|
| FormulaToken |
InfillPTG(DataProvider, ref int, ExcelVersion)
Infill PTG structure.
Declaration
public override void InfillPTG(DataProvider provider, ref int offset, ExcelVersion version)
Parameters
| Type | Name | Description |
|---|---|---|
| DataProvider | provider | Represents storage. |
| int | offset | Offset in storage. |
| ExcelVersion | version | Excel version that was used to infill data provider. |
Overrides
PushResultToStack(FormulaUtil, Stack<object>, bool)
Takes all needed operands from the stack and pushes the result of the function.
Declaration
public override void PushResultToStack(FormulaUtil formulaUtil, Stack<object> operands, bool isForSerialization)
Parameters
| Type | Name | Description |
|---|---|---|
| FormulaUtil | formulaUtil | Object used for formula parsing. |
| Stack<object> | operands | Stack that contains all operands and will receive result of the operation. |
| bool | isForSerialization |
Overrides
ToByteArray(ExcelVersion)
Converts token to byte array.
Declaration
public override byte[] ToByteArray(ExcelVersion version)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelVersion | version |
Returns
| Type | Description |
|---|---|
| byte[] | Array of bytes representing this token. |