IRange
A rectangular selection described by zero-based row and column indices. Both end indices are inclusive: rows 0–1 and columns 0–1 identify A1:B2. This data object describes coordinates; FRange provides operations on the cells.
import type { IRange } from '@univerjs/core'const range: IRange = { startRow: 0, endRow: 1, startColumn: 0, endColumn: 1 } // A1:B2Import
import type { IRange } from '@univerjs/core'Definition
interface IRange extends IRowRange, IColumnRange { rangeType?: RANGE_TYPE startAbsoluteRefType?: AbsoluteRefType endAbsoluteRefType?: AbsoluteRefType}Fields
rangeType
Optional · RANGE_TYPE | undefined
startAbsoluteRefType
Optional · AbsoluteRefType | undefined
endAbsoluteRefType
Optional · AbsoluteRefType | undefined
unitId
Optional · string | undefined
Id of the Workbook the range belongs to. When this field is not defined, it should be considered as the range in the currently activated worksheet.
sheetId
Optional · string | undefined
Id of the Worksheet the range belongs to. When this field is not defined, it should be considered as the range in the currently activated worksheet.
startRow
Required · number
Zero-based index of the first row, inclusive.
endRow
Required · number
Zero-based index of the last row, inclusive.
startColumn
Required · number
Zero-based index of the first column, inclusive.
endColumn
Required · number
Zero-based index of the last column, inclusive.
Related types
Package: @univerjs/core · Type definitions
How is this guide?