Class AttrPtg
A special attribute control token - typically either a SUM function or an IF function.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
[Token]
public class AttrPtg : FunctionVarPtg, ICloneable
Constructors
AttrPtg()
Default constructor for this token.
Declaration
public AttrPtg()
AttrPtg(DataProvider, Int32, ExcelVersion)
Constructs token and fills it with data from the byte array.
Declaration
public AttrPtg(DataProvider provider, int iOffset, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
DataProvider | provider | Object that provides access to the data. |
System.Int32 | iOffset | Offset to the token data. |
ExcelVersion | version | Excel version that was used to infill data provider. |
AttrPtg(Byte, UInt16)
Constructs token by options value and data.
Declaration
public AttrPtg(byte options, ushort usData)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | options | Attribute options. |
System.UInt16 | usData | Attribute data. |
AttrPtg(Int32, Int32)
Constructs token by options value and data.
Declaration
public AttrPtg(int options, int data)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | options | Attribute options. |
System.Int32 | data | Attribute data. |
Fields
SIZE
Size of the token.
Declaration
public const int SIZE = 4
Field Value
Type |
---|
System.Int32 |
Properties
AttrData
The word contained in this attribute.
Declaration
public ushort AttrData { get; set; }
Property Value
Type |
---|
System.UInt16 |
AttrData1
Declaration
public int AttrData1 { get; }
Property Value
Type |
---|
System.Int32 |
HasBaxcel
Declaration
public bool HasBaxcel { get; set; }
Property Value
Type |
---|
System.Boolean |
HasOptGoto
Returns True if this is a goto; otherwise False.
Declaration
public bool HasOptGoto { get; set; }
Property Value
Type |
---|
System.Boolean |
HasOptimizedChoose
Returns True if this is a CHOOSE; otherwise False.
Declaration
public bool HasOptimizedChoose { get; set; }
Property Value
Type |
---|
System.Boolean |
HasOptimizedIf
Returns True if this is an IF; otherwise False.
Declaration
public bool HasOptimizedIf { get; set; }
Property Value
Type |
---|
System.Boolean |
HasSemiVolatile
True when following function has semivolatile value, that can change without user interaction (such as NOW, TODAY, etc.).
Declaration
public bool HasSemiVolatile { get; set; }
Property Value
Type |
---|
System.Boolean |
HasSpace
Returns True if space exist; otherwise False.
Declaration
public bool HasSpace { get; set; }
Property Value
Type |
---|
System.Boolean |
HasSum
Returns True if this is SUM; otherwise False.
Declaration
public bool HasSum { get; set; }
Property Value
Type |
---|
System.Boolean |
Options
Read-only. Options used by the attribute.
Declaration
public byte Options { get; }
Property Value
Type |
---|
System.Byte |
SpaceAfterToken
Declaration
public bool SpaceAfterToken { get; set; }
Property Value
Type |
---|
System.Boolean |
SpaceCount
Gets / sets number of spaces in the case of space token.
Declaration
public int SpaceCount { get; set; }
Property Value
Type |
---|
System.Int32 |
Methods
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
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
PushResultToStack(FormulaUtil, Stack<Object>, Boolean)
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. |
System.Collections.Generic.Stack<System.Object> | operands | Stack that contains all operands that receive result of the operation. |
System.Boolean | isForSerialization |
Overrides
ToByteArray(ExcelVersion)
Converts token to array of bytes.
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
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. |