Class NameXPtg
This token contains the index to a NAME or EXTERNNAME record. It occurs by using internal or external names, add-in functions, DDE links, or linked OLE objects.
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
[CLSCompliant(false)]
[Token(FormulaToken.tNameX1)]
[Token(FormulaToken.tNameX2)]
[Token(FormulaToken.tNameX3)]
public class NameXPtg : Ptg, ICloneable, ISheetReference, IReference, IRangeGetter
Constructors
NameXPtg()
Default constructor. To prevent user from creating a token without parameters and to allow descendants do this.
Declaration
public NameXPtg()
NameXPtg(DataProvider, Int32, ExcelVersion)
Constructs token using data from array of bytes.
Declaration
public NameXPtg(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. |
NameXPtg(Int32, Int32)
Creates new instance of NameX token by extern workbook index and name index in the workbook.
Declaration
public NameXPtg(int iBookIndex, int iNameIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iBookIndex | Zero-based book index. |
System.Int32 | iNameIndex | Zero-based name index. |
NameXPtg(String, IWorkbook)
Creates token by its string representation.
Declaration
public NameXPtg(string strFormula, IWorkbook parent)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFormula | String representation of the token. |
IWorkbook | parent | Workbook that contains this reference. |
Properties
NameIndex
Gets / sets one-based index of ExternNameRecord or NameRecord.
Declaration
public ushort NameIndex { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
RefIndex
Gets / sets index to REF entry in EXTERNSHEET record in the Link Table.
Declaration
public ushort RefIndex { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
Methods
BaseToString(FormulaUtil, Int32, Int32, Boolean)
Calls ToString method of the base (not 3d) class.
Declaration
public string BaseToString(FormulaUtil formulaUtil, int iRow, int iColumn, bool bR1C1)
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. |
Returns
Type | Description |
---|---|
System.String | String representation of this token. |
GetRange(IWorkbook, IWorksheet)
Returns range represented by the token that implements this interface.
Declaration
public IRange GetRange(IWorkbook book, IWorksheet sheet)
Parameters
Type | Name | Description |
---|---|---|
IWorkbook | book | Workbook that contains range. |
IWorksheet | sheet | Parent worksheet |
Returns
Type | Description |
---|---|
IRange | Range represented by the token. |
GetRectangle()
Returns rectangle represented by the token that implements this interface.
Declaration
public Rectangle GetRectangle()
Returns
Type | Description |
---|---|
System.Drawing.Rectangle | Rectangle represented by the token. |
GetSize(ExcelVersion)
Read-only. Size of the record.
Declaration
public override int GetSize(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version |
Returns
Type | Description |
---|---|
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 token code. |
Returns
Type | Description |
---|---|
FormulaToken | Required token code. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | When index is less than 1 or greater 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
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 corresponding to the 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. |
Overrides
ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo, Boolean, IWorksheet)
Converts token to a string.
Declaration
public override string ToString(FormulaUtil formulaUtil, int row, int col, bool bR1C1, NumberFormatInfo numberInfo, bool isForSerialization, IWorksheet sheet)
Parameters
Type | Name | Description |
---|---|---|
FormulaUtil | formulaUtil | Formula util. |
System.Int32 | row | |
System.Int32 | col | |
System.Boolean | bR1C1 | Indicates whether R1C1 notation should be used. |
System.Globalization.NumberFormatInfo | numberInfo | |
System.Boolean | isForSerialization | |
IWorksheet | sheet |
Returns
Type | Description |
---|---|
System.String | String representation of this token. |
Overrides
UpdateRectangle(Rectangle)
Declaration
public Ptg UpdateRectangle(Rectangle rectangle)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Rectangle | rectangle |
Returns
Type | Description |
---|---|
Ptg |