menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class AreaPtg - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class AreaPtg

    This token contains the reference to a cell range in the same sheet.

    Inheritance
    System.Object
    Ptg
    AreaPtg
    Area3DPtg
    AreaErrorPtg
    AreaNPtg
    Implements
    System.ICloneable
    IRangeGetterToken
    IRangeGetter
    IRectGetter
    IToken3D
    Inherited Members
    Ptg.Clone()
    Ptg.CompareArrays(Ptg[], Ptg[])
    Ptg.CompareContent(Ptg)
    Ptg.CompareTo(Ptg)
    Ptg.ConvertSharedToken(IWorkbook, Int32, Int32)
    Ptg.GetString16Bit(Byte[], Int32)
    Ptg.GetString16Bit(Byte[], Int32, Int32)
    Ptg.IndexToCode(FormulaToken, Int32)
    Ptg.IsOperation
    Ptg.RectangleContains(Rectangle, Int32, Int32)
    Ptg.TokenCode
    Ptg.ToString()
    Ptg.ToString(FormulaUtil)
    Ptg.ToString(FormulaUtil, Int32, Int32, Boolean)
    Ptg.ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo)
    Ptg.ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo, Boolean, IWorksheet)
    Ptg.ToString(Int32, Int32, Boolean)
    Namespace: Syncfusion.XlsIO.Parser.Biff_Records.Formula
    Assembly: Syncfusion.XlsIO.UWP.dll
    Syntax
    [Token]
    [Token]
    [Token]
    public class AreaPtg : Ptg, ICloneable, IRangeGetterToken, IRangeGetter, IRectGetter, IToken3D

    Constructors

    AreaPtg()

    Default constructor. To prevent user from creating a token without parameters and to allow descendants do this.

    Declaration
    public AreaPtg()

    AreaPtg(DataProvider, Int32, ExcelVersion)

    Creates token using data from an array of bytes.

    Declaration
    public AreaPtg(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.

    AreaPtg(AreaPtg)

    Creates copy of the token.

    Declaration
    public AreaPtg(AreaPtg ptg)
    Parameters
    Type Name Description
    AreaPtg ptg

    Token to clone.

    AreaPtg(Int32, Int32, Int32, Int32, Byte, Byte)

    Declaration
    public AreaPtg(int iFirstRow, int iFirstCol, int iLastRow, int iLastCol, byte firstOptions, byte lastOptions)
    Parameters
    Type Name Description
    System.Int32 iFirstRow
    System.Int32 iFirstCol
    System.Int32 iLastRow
    System.Int32 iLastCol
    System.Byte firstOptions
    System.Byte lastOptions

    AreaPtg(Int32, Int32, String, String, String, String, Boolean, IWorkbook)

    Creates token using strings that represents cell addresses.

    Declaration
    public AreaPtg(int iCellRow, int iCellColumn, string strFirstRow, string strFirstColumn, string strLastRow, string strLastColumn, bool bR1C1, IWorkbook book)
    Parameters
    Type Name Description
    System.Int32 iCellRow

    Row index of the cell that contains this token.

    System.Int32 iCellColumn

    Column index of the cell that contains this token.

    System.String strFirstRow

    String representation of the first row.

    System.String strFirstColumn

    String representation of the first column.

    System.String strLastRow

    String representation of the last row.

    System.String strLastColumn

    String representation of the last column.

    System.Boolean bR1C1
    IWorkbook book

    Parent workbook.

    AreaPtg(String, IWorkbook)

    Creates token by its string representation.

    Declaration
    public AreaPtg(string strFormula, IWorkbook book)
    Parameters
    Type Name Description
    System.String strFormula

    String representation of the formula.

    IWorkbook book

    Parent workbook.

    Exceptions
    Type Condition
    System.ArgumentException

    When specified string is not valid token string.

    Properties

    FirstColumn

    Index to column (0..255) or column offset (-128..127).

    Declaration
    public int FirstColumn { get; set; }
    Property Value
    Type
    System.Int32

    FirstOptions

    Options for the top left cell of the range.

    Declaration
    protected byte FirstOptions { get; set; }
    Property Value
    Type
    System.Byte

    FirstRow

    Index of the first row (0..65535) or row offset (-32768..32767).

    Declaration
    public int FirstRow { get; set; }
    Property Value
    Type
    System.Int32

    IsFirstColumnRelative

    True if the first column index is relative.

    Declaration
    public bool IsFirstColumnRelative { get; set; }
    Property Value
    Type
    System.Boolean

    IsFirstRowRelative

    True if the first row index is relative.

    Declaration
    public bool IsFirstRowRelative { get; set; }
    Property Value
    Type
    System.Boolean

    IsLastColumnRelative

    True if the last column index is relative.

    Declaration
    public bool IsLastColumnRelative { get; set; }
    Property Value
    Type
    System.Boolean

    IsLastRowRelative

    True if the last row index is relative.

    Declaration
    public bool IsLastRowRelative { get; set; }
    Property Value
    Type
    System.Boolean

    LastColumn

    Index to column (0..255) or column offset (-128..127).

    Declaration
    public int LastColumn { get; set; }
    Property Value
    Type
    System.Int32

    LastOptions

    Options for the bottom right cell of the range.

    Declaration
    protected byte LastOptions { get; set; }
    Property Value
    Type
    System.Byte

    LastRow

    Index of the last row (0..65535) or row offset (-32768..32767).

    Declaration
    public int LastRow { get; set; }
    Property Value
    Type
    System.Int32

    Methods

    CodeToIndex()

    Converts token code to index (inverse operation to IndexToCode).

    Declaration
    public virtual int CodeToIndex()
    Returns
    Type Description
    System.Int32

    Reference index.

    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.

    ConvertFullRowColumnAreaPtgs(Boolean)

    Converts full row or column ptg from Excel2007 to Excel97to03 version and vice versa.

    Declaration
    public AreaPtg ConvertFullRowColumnAreaPtgs(bool bFromExcel07To97)
    Parameters
    Type Name Description
    System.Boolean bFromExcel07To97

    Defines what conversion must be applied.

    Returns
    Type Description
    AreaPtg

    Returns converted Ptg.

    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
    Ptg.ConvertPtgToNPtg(IWorkbook, Int32, Int32)

    ConvertToError()

    Converts current token into error token.

    Declaration
    public virtual Ptg ConvertToError()
    Returns
    Type Description
    Ptg

    Created token.

    ConvertToErrorPtg()

    Converts incorrect area range to corresponding error ptg.

    Declaration
    public virtual AreaPtg ConvertToErrorPtg()
    Returns
    Type
    AreaPtg

    Get3DToken(Int32)

    Converts current token to the 3D token.

    Declaration
    public Ptg Get3DToken(int iSheetReference)
    Parameters
    Type Name Description
    System.Int32 iSheetReference

    Reference to the worksheet.

    Returns
    Type Description
    Ptg

    Created token.

    GetCorrespondingErrorCode()

    Gets corresponding error code.

    Declaration
    public virtual FormulaToken GetCorrespondingErrorCode()
    Returns
    Type Description
    FormulaToken

    Corresponding error code.

    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.

    GetRectangle()

    Returns rectangle represented by the token that implements this interface. All coordinates are zero-based.

    Declaration
    public Rectangle GetRectangle()
    Returns
    Type Description
    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
    System.Int32
    Overrides
    Ptg.GetSize(ExcelVersion)

    IndexToCode(Int32)

    Converts specified index to token code.

    Declaration
    public static FormulaToken IndexToCode(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the needed token.

    Returns
    Type Description
    FormulaToken

    Token that corresponds to the index.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    When index is less than one 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
    Ptg.InfillPTG(DataProvider, ref Int32, ExcelVersion)

    IsWholeColumn(IWorkbook)

    Indicates whether area covers whole single column. Read-only.

    Declaration
    protected bool IsWholeColumn(IWorkbook book)
    Parameters
    Type Name Description
    IWorkbook book
    Returns
    Type
    System.Boolean

    IsWholeColumns(IWorkbook)

    Indicates whether area covers whole columns. Read-only.

    Declaration
    protected bool IsWholeColumns(IWorkbook book)
    Parameters
    Type Name Description
    IWorkbook book
    Returns
    Type
    System.Boolean

    IsWholeRow(IWorkbook)

    Indicates whether area covers whole single row. Read-only.

    Declaration
    protected bool IsWholeRow(IWorkbook book)
    Parameters
    Type Name Description
    IWorkbook book
    Returns
    Type
    System.Boolean

    IsWholeRows(IWorkbook)

    Indicates whether area covers whole rows. Read-only.

    Declaration
    protected bool IsWholeRows(IWorkbook book)
    Parameters
    Type Name Description
    IWorkbook book
    Returns
    Type
    System.Boolean

    Offset(Int32, Int32, WorkbookImpl)

    Moves row by iRowOffset, iColumnOffset.

    Declaration
    public override Ptg Offset(int iRowOffset, int iColumnOffset, WorkbookImpl book)
    Parameters
    Type Name Description
    System.Int32 iRowOffset

    Row offset.

    System.Int32 iColumnOffset

    Column offset.

    WorkbookImpl book

    Parent workbook.

    Returns
    Type Description
    Ptg

    Updated token.

    Overrides
    Ptg.Offset(Int32, Int32, WorkbookImpl)

    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
    Ptg.Offset(Int32, Int32, Int32, Int32, Rectangle, Int32, Rectangle, out Boolean, WorkbookImpl)

    SetArea(Int32, Int32, String, String, String, String, Boolean, IWorkbook)

    Parses specified column and row values and fills token fields with appropriate values.

    Declaration
    protected void SetArea(int iCellRow, int iCellColumn, string row1, string column1, string row2, string column2, bool bR1C1, IWorkbook book)
    Parameters
    Type Name Description
    System.Int32 iCellRow

    Row index of the cell that contains this token.

    System.Int32 iCellColumn

    Column index of the cell that contains this token.

    System.String row1

    String representing top row of the area.

    System.String column1

    String representing left column of the area.

    System.String row2

    String representing bottom row of the area.

    System.String column2

    String representing right column of the area.

    System.Boolean bR1C1

    Indicates whether R1C1 notation is used.

    IWorkbook book

    Parent workbook.

    ToByteArray(ExcelVersion)

    Converts token to byte array.

    Declaration
    public override byte[] ToByteArray(ExcelVersion version)
    Parameters
    Type Name Description
    ExcelVersion version
    Returns
    Type Description
    System.Byte[]

    Array of bytes representing token.

    Overrides
    Ptg.ToByteArray(ExcelVersion)

    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
    Ptg.ToString(FormulaUtil, Int32, Int32, Boolean, NumberFormatInfo, Boolean)

    UpdateRectangle(Rectangle)

    Declaration
    public Ptg UpdateRectangle(Rectangle rectangle)
    Parameters
    Type Name Description
    Rectangle rectangle
    Returns
    Type
    Ptg

    Implements

    System.ICloneable
    IRangeGetterToken
    IRangeGetter
    IRectGetter
    IToken3D

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved