Class ArrayPtg
This token contains an array constant. The values of the array constant do not follow the token identifier but are stored behind the complete token array.
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
[Token(FormulaToken.tArray1)]
[Token(FormulaToken.tArray2)]
[Token(FormulaToken.tArray3)]
public class ArrayPtg : Ptg, IAdditionalData, ICloneable
Constructors
ArrayPtg()
Default constructor. To prevent user from creating a token without parameters and to allow descendants do this.
Declaration
public ArrayPtg()
ArrayPtg(DataProvider, Int32, ExcelVersion)
Constructs array but does not read any data. ReadArray should be called for this purpose because array data is placed just after all other tokens.
Declaration
public ArrayPtg(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. |
ArrayPtg(String, FormulaUtil)
Constructs array token using string representation.
Declaration
public ArrayPtg(string strFormula, FormulaUtil formulaParser)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFormula | Formula string. |
FormulaUtil | formulaParser | Formula parser. |
Fields
BOOLEANVALUE
Constant that indicates that there is boolean value in the array.
Declaration
public const byte BOOLEANVALUE = 4
Field Value
Type |
---|
System.Byte |
ColSeparator
Separators between columns of the array.
Declaration
public static readonly string ColSeparator
Field Value
Type |
---|
System.String |
DOUBLEVALUE
Constant that indicates that there is double value in the array.
Declaration
public const byte DOUBLEVALUE = 1
Field Value
Type |
---|
System.Byte |
ERRORCODEVALUE
Constant that indicates that there is error code in the array.
Declaration
public const byte ERRORCODEVALUE = 16
Field Value
Type |
---|
System.Byte |
NilValue
Constant that indicates that there is null code in the array.
Declaration
public const byte NilValue = 0
Field Value
Type |
---|
System.Byte |
RowSeparator
Separators between rows of the array.
Declaration
public static readonly string RowSeparator
Field Value
Type |
---|
System.String |
STRINGVALUE
Constant that indicates that there is string value in the array.
Declaration
public const byte STRINGVALUE = 2
Field Value
Type |
---|
System.Byte |
Properties
AdditionalDataSize
Declaration
public int AdditionalDataSize { get; }
Property Value
Type |
---|
System.Int32 |
Methods
Clone()
Declaration
public object Clone()
Returns
Type |
---|
System.Object |
GetListBytes()
Returns all values in data array. Must be written after formula data.
Declaration
public BytesList GetListBytes()
Returns
Type | Description |
---|---|
BytesList | Array of bytes of all constants stored in the array. |
GetSize(ExcelVersion)
Read-only. Size of the array token.
Declaration
public override int GetSize(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version |
Returns
Type |
---|
System.Int32 |
Overrides
IndexToCode(Int32)
Returns token code by index.
Declaration
public static FormulaToken IndexToCode(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of the needed token. |
Returns
Type |
---|
FormulaToken |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | When index is less than 1 or larger than 3. |
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
ReadArray(DataProvider, Int32)
Reads array from byte array.
Declaration
public int ReadArray(DataProvider provider, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataProvider | provider | Object that provides access to the data. |
System.Int32 | offset | Starting position of array data. |
Returns
Type | Description |
---|---|
System.Int32 | Offset if the first byte after array. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | When data array is too small for tArray data. |
ToByteArray(ExcelVersion)
Converts tArray token to byte array.
Declaration
public override byte[] ToByteArray(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version | Excel version - defines resulting array format and size. |
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. |