Class Area3DPtg
This token contains a 3D reference or an external reference to a cell range.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
[Token]
[Token]
[Token]
public class Area3DPtg : AreaPtg, ICloneable, IRangeGetterToken, IRectGetter, IToken3D, ISheetReference, IReference, IRangeGetter
Constructors
Area3DPtg()
Default constructor. To prevent user from creating a token without parameters and to allow descendants do this.
Declaration
public Area3DPtg()
Area3DPtg(DataProvider, Int32, ExcelVersion)
Creates token using data from an array of bytes.
Declaration
public Area3DPtg(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. |
Area3DPtg(Area3DPtg)
Creates new token based on another Area3D token.
Declaration
public Area3DPtg(Area3DPtg ptg)
Parameters
Type | Name | Description |
---|---|---|
Area3DPtg | ptg | Token to copy. |
Area3DPtg(Int32, Int32, Int32, Int32, Int32, Byte, Byte)
Initializes new token.
Declaration
public Area3DPtg(int iSheetIndex, int iFirstRow, int iFirstCol, int iLastRow, int iLastCol, byte firstOptions, byte lastOptions)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iSheetIndex | Worksheet reference index. |
System.Int32 | iFirstRow | Zero-based first row index. |
System.Int32 | iFirstCol | Zero-based first column index. |
System.Int32 | iLastRow | Zero-based last row index. |
System.Int32 | iLastCol | Zero-based last column index. |
System.Byte | firstOptions | First cell options. |
System.Byte | lastOptions | Second cell options. |
Area3DPtg(Int32, Int32, Int32, String, String, String, String, Boolean, IWorkbook)
Initializes new token.
Declaration
public Area3DPtg(int iCellRow, int iCellColumn, int iRefIndex, string strFirstRow, string strFirstColumn, string strLastRow, string strLastColumn, bool bR1C1, IWorkbook book)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iCellRow | Zero-based row index of the cell that will contain new token. |
System.Int32 | iCellColumn | Zero-based column index of the cell that will contain new token. |
System.Int32 | iRefIndex | Worksheet reference index. |
System.String | strFirstRow | String representation of the first row of the area. |
System.String | strFirstColumn | String representation of the first column of the area. |
System.String | strLastRow | String representation of the last row of the area. |
System.String | strLastColumn | String representation of the last column of the area. |
System.Boolean | bR1C1 | Indicates whether strings are in R1C1 notation. |
IWorkbook | book | Parent workbook. |
Area3DPtg(String, IWorkbook)
Constructs token by string value and parent workbook.
Declaration
public Area3DPtg(string strFormula, IWorkbook parent)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFormula | String representation of the token. |
IWorkbook | parent | Workbook containing the token. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | When specified formula string is not valid Area3D string. |
Properties
RefIndex
Reference to the worksheet. Read-only.
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()
Declaration
public override int CodeToIndex()
Returns
Type |
---|
System.Int32 |
Overrides
CodeToIndex(FormulaToken)
Converts specified token code to index.
Declaration
public static int CodeToIndex(FormulaToken code)
Parameters
Type | Name | Description |
---|---|---|
FormulaToken | code | Token code for which index is required. |
Returns
Type | Description |
---|---|
System.Int32 | Index that corresponds to the code. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | When index is not one of tArea1, tArea2, tArea3. |
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
ConvertToErrorPtg()
Converts incorrect area range to corresponding error ptg.
Declaration
public override AreaPtg ConvertToErrorPtg()
Returns
Type |
---|
AreaPtg |
Overrides
GetCorrespondingErrorCode()
Declaration
public override FormulaToken GetCorrespondingErrorCode()
Returns
Type |
---|
FormulaToken |
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. |
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
IndexToCode(Int32)
Converts specified index to the token code.
Declaration
public static FormulaToken IndexToCode(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Function parameter index. |
Returns
Type | Description |
---|---|
FormulaToken | Token code that corresponds to the specified index. |
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 | |
System.Drawing.Rectangle | rectSource | |
System.Int32 | iDestSheetIndex | |
System.Drawing.Rectangle | rectDest | |
System.Boolean | bChanged | |
WorkbookImpl | book | Parent workbook. |
Returns
Type |
---|
Ptg |
Overrides
SetSheetIndex(String, IWorkbook)
Sets index of the sheet in the correct value, taking information from the 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 and must contain specified worksheet. |
Exceptions
Type | Condition |
---|---|
ParseException | Unable to find specified worksheet in the workbook, possibly because wasn't loaded yet. |
SetValues(Match, IWorkbook)
Set area values such as reference indexes, first and last columns, and rows.
Declaration
protected void SetValues(Match m, IWorkbook parent)
Parameters
Type | Name | Description |
---|---|---|
System.Text.RegularExpressions.Match | m | Match that contains such groups SheetName, Column1, Column2, Row1, Row2. |
IWorkbook | parent | Workbook that contains this token. |
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 that represents 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. |
Overrides
ValidateSheetName(String)
To check the sheet name it's having any special charecter or not
Declaration
public static bool ValidateSheetName(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
Returns
Type |
---|
System.Boolean |