Class: CellRange

Core.SpreadsheetEditor. CellRange

Represents a range of cells within a spreadsheet that encapsulates the coordinates of a rectangular cell range, defined by its first and last rows and columns.

new CellRange()

Properties:
Name Type Description
firstRow number The first row in a specified range of cells within a sheet that identifies the vertical starting boundary in a spreadsheet.
lastRow number The index of the last row in a specified range of cells within a sheet.
firstColumn number The first column in a specified range of cells within a sheet that identifies the starting boundary of a cell range along the horizontal axis of a spreadsheet.
lastColumn number The index of the last column in a specified range of cells within a sheet.
rangeDisplayValue string The display value of the cell range in the format "A1:B2".

Methods


<static> parseRangeString(range)

Parses a range string (e.g., `"A1:B2"` or `"A1"`) into row and column indices.
Parameters:
Name Type Description
range string The range string.
Returns:
An object containing `firstRow`, `lastRow`, `firstColumn`, and `lastColumn`.
Type
object

equals(cellRange)

Compares the cell range with another cell range to determine if they are equal.
Parameters:
Name Type Description
cellRange Core.SpreadsheetEditor.CellRange The cell range to compare.
Returns:
Returns true if the cell range is equal to the other cell range, otherwise false.
Type
boolean

isSingleCellRange()

Checks if the cell range is a single cell.
Returns:
Returns true if the cell range is a single cell, otherwise false.
Type
boolean