Class RefNPtg
This token contains the reference to a cell in the same sheet. It stores relative components as signed offsets and is used in shared formulas, conditional formatting, and data validity.
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
[Token]
[Token]
[Token]
public class RefNPtg : RefPtg, ICloneable, IRangeGetterToken, IRangeGetter, IRectGetter, IToken3D
Constructors
RefNPtg()
Default constructor. To prevent user from creating a token without parameters and to allow descendants do this.
Declaration
public RefNPtg()
RefNPtg(DataProvider, Int32, ExcelVersion)
Creates token using data from an array of bytes.
Declaration
public RefNPtg(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. |
RefNPtg(Int32, Int32, String, String, Boolean)
Constructs reference by its string representation.
Declaration
public RefNPtg(int iCellRow, int iCellColumn, string strRow, string strColumn, bool bR1C1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iCellRow | Row index of the cell that contains formula to parse. |
System.Int32 | iCellColumn | Column index of the cell that contains formula to parse. |
System.String | strRow | String representation of the row. |
System.String | strColumn | String representation of the column. |
System.Boolean | bR1C1 | Indicates whether R1C1 notation was used. |
Methods
CodeToIndex(FormulaToken)
Converts token code to index (inverse operation to IndexToCode).
Declaration
public static int CodeToIndex(FormulaToken token)
Parameters
Type | Name | Description |
---|---|---|
FormulaToken | token | Token code (should be one of tRefN1, tRefN2, tRefN3). |
Returns
Type | Description |
---|---|
System.Int32 | Reference index. |
ConvertSharedToken(IWorkbook, Int32, Int32)
Converts token from shared formula into token from regular formula.
Declaration
public override Ptg ConvertSharedToken(IWorkbook parent, int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
IWorkbook | parent | Parent workbook. |
System.Int32 | iRow | Row index. |
System.Int32 | iColumn | Column index. |
Returns
Type | Description |
---|---|
Ptg | New token for regular formula. |
Overrides
Get3DToken(Int32)
Converts current token to the 3D token.
Declaration
public override Ptg Get3DToken(int iSheetReference)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iSheetReference | Reference to the worksheet. |
Returns
Type | Description |
---|---|
Ptg | Created token. |
Overrides
IndexToCode(Int32)
Converts reference index to token code.
Declaration
public static FormulaToken IndexToCode(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Reference index. |
Returns
Type | Description |
---|---|
FormulaToken | Token code. |
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. |