Class Ref3DPtg
This token contains a 3D reference or an external reference to a cell.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
[Token]
[Token]
[Token]
public class Ref3DPtg : RefPtg, ICloneable, IRangeGetterToken, IRectGetter, IToken3D, IRangeGetter, ISheetReference, IReference
Constructors
Ref3DPtg()
Default constructor. To prevent user from creating a token without parameters and to allow descendants do this.
Declaration
public Ref3DPtg()
Ref3DPtg(DataProvider, Int32, ExcelVersion)
Creates token using data from an array of bytes.
Declaration
public Ref3DPtg(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. |
Ref3DPtg(Ref3DPtg)
Declaration
public Ref3DPtg(Ref3DPtg twin)
Parameters
Type | Name | Description |
---|---|---|
Ref3DPtg | twin |
Ref3DPtg(Int32, Int32, Int32, Byte)
Creates token.
Declaration
public Ref3DPtg(int iSheetIndex, int iRowIndex, int iColIndex, byte options)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iSheetIndex | Sheet reference. |
System.Int32 | iRowIndex | Row index. |
System.Int32 | iColIndex | Column index. |
System.Byte | options | Options. |
Ref3DPtg(Int32, Int32, Int32, String, String, Boolean)
Declaration
public Ref3DPtg(int iCellRow, int iCellColumn, int iSheetIndex, string strRow, string strColumn, bool bR1C1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iCellRow | |
System.Int32 | iCellColumn | |
System.Int32 | iSheetIndex | |
System.String | strRow | |
System.String | strColumn | |
System.Boolean | bR1C1 |
Ref3DPtg(String, IWorkbook)
Creates token by its string representation.
Declaration
public Ref3DPtg(string strFormula, IWorkbook parent)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFormula | String representation of the token. |
IWorkbook | parent | Workbook that contains this reference. |
Properties
RefIndex
Declaration
public ushort RefIndex { get; set; }
Property Value
Type |
---|
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. |
CodeToIndex()
Converts token code to index (inverse operation to IndexToCode).
Declaration
public override int CodeToIndex()
Returns
Type | Description |
---|---|
System.Int32 | Reference index. |
Overrides
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 tRef1, tRef2, tRef3). |
Returns
Type | Description |
---|---|
System.Int32 | Reference index. |
ConvertPtgToNPtg(IWorkbook, Int32, Int32)
Converts tokens from regular formula into tokens from shared formula.
Declaration
public override Ptg ConvertPtgToNPtg(IWorkbook parent, int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
IWorkbook | parent | Parent workbook. |
System.Int32 | iRow | Represents first row from cells range of shared formula.Zero-base. |
System.Int32 | iColumn | Represents first column from cells range of shared formula.Zero-based. |
Returns
Type | Description |
---|---|
Ptg | New token for shared formula. |
Overrides
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
GetCorrespondingErrorCode()
Gets corresponding error code.
Declaration
public override FormulaToken GetCorrespondingErrorCode()
Returns
Type | Description |
---|---|
FormulaToken | Corresponding error code. |
Overrides
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 | Worksheet that contains range. |
Returns
Type | Description |
---|---|
IRange | Range represented by the token. |
GetSheetName(IWorkbook, Int32)
Returns referenced worksheet name.
Declaration
public static string GetSheetName(IWorkbook book, int refIndex)
Parameters
Type | Name | Description |
---|---|---|
IWorkbook | book | Parent workbook. |
System.Int32 | refIndex | Sheet reference index |
Returns
Type | Description |
---|---|
System.String | Referenced worksheet name. |
GetSize(ExcelVersion)
Read-only. Size of the record.
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 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
Offset(Int32, Int32, Int32, Int32, Rectangle, Int32, Rectangle, out Boolean, WorkbookImpl)
Declaration
public override Ptg Offset(int iCurSheetIndex, int iTokenRow, int iTokenColumn, int iSourceSheetIndex, Rectangle rectSource, int iDestSheetIndex, Rectangle rectDest, out bool bChanged, WorkbookImpl book)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iCurSheetIndex | |
System.Int32 | iTokenRow | |
System.Int32 | iTokenColumn | |
System.Int32 | iSourceSheetIndex | |
Rectangle | rectSource | |
System.Int32 | iDestSheetIndex | |
Rectangle | rectDest | |
System.Boolean | bChanged | |
WorkbookImpl | book | Parent workbook. |
Returns
Type |
---|
Ptg |
Overrides
SetSheetIndex(String, IWorkbook)
Sets index of the sheet in correct value by getting the information from specified workbook.
Declaration
protected void SetSheetIndex(string sheetName, IWorkbook parent)
Parameters
Type | Name | Description |
---|---|---|
System.String | sheetName | Name of the worksheet that is referenced. |
IWorkbook | parent | Workbook that contains this record. It must contain specified worksheet. |
ToByteArray(ExcelVersion)
Converts token to the array of bytes.
Declaration
public override byte[] ToByteArray(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version |
Returns
Type | Description |
---|---|
System.Byte[] | Array of bytes that represents this token. |
Overrides
ToString()
Converts token to the string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String representation of 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. |