API 参考

IRange

本 API 页面目前提供英文正文。代码签名与标识符不随界面语言变化。

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.

TypeScript
import type { IRange } from '@univerjs/core'const range: IRange = { startRow: 0, endRow: 1, startColumn: 0, endColumn: 1 } // A1:B2

Import

TypeScript
import type { IRange } from '@univerjs/core'

Definition

TypeScript
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.

Package: @univerjs/core · Type definitions

你觉得这篇文档如何?

© 2026 DreamNum Co., Ltd.