Class ParenthesesPtg
Parentheses. This token is for display purposes only, it does not affect the result of the token array. If it follows an operator, the parentheses will enclose the operator and its operand(s), which is the result of the enclosed operation. This operator does not modify the token class of its operand.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
[Token(FormulaToken.tParentheses, "(")]
public class ParenthesesPtg : UnaryOperationPtg, ICloneable
Constructors
ParenthesesPtg()
Default constructor
Declaration
public ParenthesesPtg()
ParenthesesPtg(DataProvider, Int32, ExcelVersion)
Creates token using data from an array of bytes.
Declaration
public ParenthesesPtg(DataProvider provider, int offset, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
DataProvider | provider | Object that provides access to the data. |
System.Int32 | offset | Offset to the token data. |
ExcelVersion | version | Excel version that was used to infill data provider. |
ParenthesesPtg(String)
Creates token by string representation.
Declaration
public ParenthesesPtg(string strFormula)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFormula | String should be equal to "(". |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | When strFormula is not equal to "(". |
Properties
Attributes
Returns all TokenAttributes applied to the token. Read-only.
Declaration
protected override TokenAttribute[] Attributes { get; }
Property Value
Type |
---|
TokenAttribute[] |
Overrides
Methods
GetOperands(String, ref Int32, FormulaUtil)
Returns array of string where each member corresponds to one argument.
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 opening bracket. |
FormulaUtil | formulaParser | Formula parser. |
Returns
Type | Description |
---|---|
System.String[] | Array of strings that contain operation parameters. |
Overrides
PushResultToStack(FormulaUtil, Stack<Object>, Boolean)
Gets all needed operands from the Stack parameter and pushes 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 will receive operation result as string. |
System.Boolean | isForSerialization |
Overrides
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
UpdateParseOptions(ExcelParseFormulaOptions)
Updates parse formula options if necessary.
Declaration
public override ExcelParseFormulaOptions UpdateParseOptions(ExcelParseFormulaOptions options)
Parameters
Type | Name | Description |
---|---|---|
ExcelParseFormulaOptions | options | Options to update. |
Returns
Type | Description |
---|---|
ExcelParseFormulaOptions | Updated value. |