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(options)

Parameters:
Name Type Description
options Object The options for creating a cell range.
Properties
Name Type Description
firstRow number The first row index of the cell range.
lastRow number The last row index of the cell range.
firstColumn number The first column index of the cell range.
lastColumn number The last column index of the cell range.
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

isSingleCell()

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