Table of Contents

TXlsCellRange Record

An Excel Cell range, 1-based.

Syntax

Unit: FlexCel.Core

TXlsCellRange = record;

Fields

Name Description
Bottom Last row on range.
HasValue False if the record doesn't have a defined value. When this field is false, the values of left, right, top and bottom don't matter.
Left First column on range.
Right Last column on range.
Top First row on range.

Methods

Name Description
CalcTopCell Returns the minimum top and left coordinates for an array of ranges. If for example you have C7 and D5, this method will return C5
Contains Returns true if the cell is inside the range.
Create Overloaded
Create
Create(string)
Create(Integer, Integer, Integer, Integer)
Dec Returns a COPY of the range decremented by one.
Equals Returns true if both objects are equal.
FullRange Creates a range with all cells on the sheet (65536 rows x 256 columns in Excel 97-2003)
GetHashCode Returns the hashcode of the object.
HasCol True if the specified column is in the range
HasRow True if the specified row is in the range
Inc Returns a COPY of the range incremented by one.
Intersects Returns true if this range intersects with another.
IsNull Returns true if the record doesn't have a defined value. This is the inverse of HasValue
Null Creates an invalid Cell range with the IsNull field set.
Offset Creates a new range with the start at newTopRow, newLeftCol.
ToString A human-readable representation of the range.
Transpose Returns the range transposed, rows by columns.

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
CellRef Gets or sets the string that defines the 2D-range in A1 notation.
ColCount Number of columns on the range.
IsOneCell Returns true if the range has only one cell.
RowCount Number of rows on the range.