Search Results for

    Show / Hide Table of Contents

    TCellAddress Record

    Small class that can convert between a string reference ("A1") into row and col integers (1,1).

    Syntax

    Unit: FlexCel.Core

    TCellAddress = record;

    Methods

    Name Description
    ReadSimpleCol An optimized method to read cell references in xlsx files. It won't allow sheets.
    Empty Returns a Cell Address pointing to an invalid reference.
    Create Overloaded
    Create(string)
    Create(Integer, Integer)
    Create(Integer, Integer, Boolean, Boolean)
    Create(string, Integer, Integer, Boolean, Boolean)
    QuoteSheet Quotes a sheet name if it is needed. For example, Sheet 1 should be quoted as 'Sheet 1'
    NameIsReserved Returns true if the string can be a cell reference, like A1 or LVM78, or "R", "C", "TRUE" or "FALSE".
    If this method returns true, you can't name a sheet or a named range with name.
    EncodeColumn Returns "A" for column 1, "B" for 2 and so on.
    DecodeColumn Returns 1 for column "A", 2 for "B" and so on. If the string isn't a valid column name, this method will return -1.
    You normally will just want to create TCellAddress to convert between cell references (var cell = new TCellAddress(row, col); DoSomething(​cell.​Cell​Ref)​.​
    But this method could be used in specific cases where you want only the column string and not the full address.
    ToString Returns the cell reference.
    CellRefR1C1 Returns the cell reference in the objects in R1C1 notation.
    TrySetCellRef Overloaded
    TrySetCellRef(string)
    TrySetCellRef(string, TReferenceStyle, Integer, Integer)
    TryParseSheet Parses a string like Sheet1!A1 into a sheet component and the rest. If the sheet is quoted ('sheet 1') it will be unquoted.
    Equals Returns true if both objects have the same data.
    GetHashCode Returns the hashcode of this object.
    IsNull Returns true if the record doesn't have a defined value.
    HasValue Returns true if the record has a defined value. This is the inverse of IsNull

    Operators

    Name Description
    Equality Adapts the = operator so it returns true when both instances have the same values.
    Inequality Adapts the <> operator so it returns true when both instances have different values.

    Properties

    Name Description
    Sheet Sheet name of the reference.
    Row Row index for this reference (1-based).
    Col Column index for this reference (1-based).
    RowAbsolute True if the row is an absolute reference (as in A$5)
    ColAbsolute True if the column is an absolute reference (as in $A5)
    CellRef Cell address in Excel A1 notation. (For example "A5").
    Absolute references ($A$5) will work too.
    In This Article
    Back to top FlexCel Studio for VCL and FireMonkey v7.8.0
    © 2002 - 2020 tmssoftware.com