@univerjs/engine-formula v0.5.0-beta.1 • Docs


Class: BaseReferenceObject

Extends

  • ObjectClassType

Extended by

Constructors

new BaseReferenceObject()

new BaseReferenceObject(_token): BaseReferenceObject

Parameters

ParameterType
_tokenstring

Returns

BaseReferenceObject

Overrides

ObjectClassType.constructor

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:77

Properties

PropertyTypeDefault valueInherited fromDefined in
patternstring''ObjectClassType.patternsubmodules/univer/packages/engine-formula/src/basics/object-class-type.ts:18

Methods

dispose()

dispose(): void

Returns

void

Overrides

ObjectClassType.dispose

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:81


getActiveSheetColumnCount()

getActiveSheetColumnCount(): number

Returns

number

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:341


getActiveSheetRowCount()

getActiveSheetRowCount(): number

Returns

number

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:337


getArrayFormulaCellData()

getArrayFormulaCellData(): IRuntimeUnitDataType

Returns

IRuntimeUnitDataType

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:313


getCellByColumn()

getCellByColumn(column): 
  | ErrorValueObject
  | NullValueObject
  | NumberValueObject
  | BooleanValueObject
  | StringValueObject
  | ArrayValueObject

Parameters

ParameterType
columnnumber

Returns

| ErrorValueObject | NullValueObject | NumberValueObject | BooleanValueObject | StringValueObject | ArrayValueObject

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:430


getCellByPosition()

getCellByPosition(rowRaw?, columnRaw?): 
  | ErrorValueObject
  | NullValueObject
  | NumberValueObject
  | BooleanValueObject
  | StringValueObject
  | ArrayValueObject

Parameters

ParameterType
rowRaw?number
columnRaw?number

Returns

| ErrorValueObject | NullValueObject | NumberValueObject | BooleanValueObject | StringValueObject | ArrayValueObject

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:476


getCellByRow()

getCellByRow(row): 
  | ErrorValueObject
  | NullValueObject
  | NumberValueObject
  | BooleanValueObject
  | StringValueObject
  | ArrayValueObject

Parameters

ParameterType
rownumber

Returns

| ErrorValueObject | NullValueObject | NumberValueObject | BooleanValueObject | StringValueObject | ArrayValueObject

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:426


getCellData()

getCellData(row, column): Nullable<ICellData>

Parameters

ParameterType
rownumber
columnnumber

Returns

Nullable<ICellData>

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:454


getCellPattern()

getCellPattern(
   unitId, 
   sheetId, 
   row, 
   column): string

Get the pattern of the cell

Parameters

ParameterType
unitIdstring
sheetIdstring
rownumber
columnnumber

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:504


getCellValueObject()

getCellValueObject(cell): 
  | ErrorValueObject
  | NullValueObject
  | NumberValueObject
  | BooleanValueObject
  | StringValueObject
  | ArrayValueObject

Parameters

ParameterType
cellICellData

Returns

| ErrorValueObject | NullValueObject | NumberValueObject | BooleanValueObject | StringValueObject | ArrayValueObject

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:396


getColumnCount()

getColumnCount(): number

Returns

number

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:349


getColumnData()

getColumnData(): IObjectArrayPrimitiveType<Partial<IColumnData>>

Returns

IObjectArrayPrimitiveType<Partial<IColumnData>>

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:357


getCurrentActiveArrayFormulaCellData()

getCurrentActiveArrayFormulaCellData(): undefined | ObjectMatrix<Nullable<ICellData>>

Returns

undefined | ObjectMatrix<Nullable<ICellData>>

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:446


getCurrentActiveSheetData()

getCurrentActiveSheetData(): ISheetItem

Returns

ISheetItem

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:434


getCurrentRuntimeActiveArrayFormulaCellData()

getCurrentRuntimeActiveArrayFormulaCellData(): undefined | ObjectMatrix<Nullable<ICellData>>

Returns

undefined | ObjectMatrix<Nullable<ICellData>>

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:450


getCurrentRuntimeSheetData()

getCurrentRuntimeSheetData(): undefined | ObjectMatrix<Nullable<ICellData>>

Returns

undefined | ObjectMatrix<Nullable<ICellData>>

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:442


getCurrentStylesData()

getCurrentStylesData(): Styles

Returns

Styles

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:438


getDefaultSheetId()

getDefaultSheetId(): string

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:277


getDefaultUnitId()

getDefaultUnitId(): string

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:285


getFirstCell()

getFirstCell(): 
  | ErrorValueObject
  | NullValueObject
  | NumberValueObject
  | BooleanValueObject
  | StringValueObject
  | ArrayValueObject

Returns

| ErrorValueObject | NullValueObject | NumberValueObject | BooleanValueObject | StringValueObject | ArrayValueObject

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:196


getForcedSheetId()

getForcedSheetId(): Nullable<string>

Returns

Nullable<string>

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:259


getForcedSheetName()

getForcedSheetName(): string

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:269


getForcedUnitId()

getForcedUnitId(): string

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:247


getPattern()

getPattern(): string

Returns

string

Inherited from

ObjectClassType.getPattern

Defined in

submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:24


getRangeData()

getRangeData(): IRange

Returns

IRange

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:219


getRangePosition()

getRangePosition(): {
  endAbsoluteRefType: AbsoluteRefType;
  endColumn: number;
  endRow: number;
  rangeType: RANGE_TYPE;
  sheetId: string;
  startAbsoluteRefType: AbsoluteRefType;
  startColumn: number;
  startRow: number;
  unitId: string;
}

Returns

{
  endAbsoluteRefType: AbsoluteRefType;
  endColumn: number;
  endRow: number;
  rangeType: RANGE_TYPE;
  sheetId: string;
  startAbsoluteRefType: AbsoluteRefType;
  startColumn: number;
  startRow: number;
  unitId: string;
}
NameTypeDescriptionDefined in
endAbsoluteRefType?AbsoluteRefType-submodules/univer/packages/core/src/sheets/typedef.ts:442
endColumnnumber-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:142
endRownumber-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:140
rangeType?RANGE_TYPE-submodules/univer/packages/core/src/sheets/typedef.ts:438
sheetId?stringId 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.submodules/univer/packages/core/src/sheets/typedef.ts:391
startAbsoluteRefType?AbsoluteRefType-submodules/univer/packages/core/src/sheets/typedef.ts:440
startColumnnumber-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:141
startRownumber-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:139
unitId?stringId 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.submodules/univer/packages/core/src/sheets/typedef.ts:385

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:118


getRefOffset()

getRefOffset(): {
  x: number;
  y: number;
}

Returns

{
  x: number;
  y: number;
}
NameTypeDefined in
xnumbersubmodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:113
ynumbersubmodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:114

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:111


getRowCount()

getRowCount(): number

Returns

number

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:345


getRowData()

getRowData(): IObjectArrayPrimitiveType<Partial<IRowData>>

Returns

IObjectArrayPrimitiveType<Partial<IRowData>>

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:353


getRuntimeArrayFormulaCellData()

getRuntimeArrayFormulaCellData(): IRuntimeUnitDataType

Returns

IRuntimeUnitDataType

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:321


getRuntimeData()

getRuntimeData(): IRuntimeUnitDataType

Returns

IRuntimeUnitDataType

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:305


getRuntimeFeatureCellData()

getRuntimeFeatureCellData(): {}

Returns

{}

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:329


getRuntimeFeatureCellValue()

getRuntimeFeatureCellValue(row, column): undefined | ICellData

Parameters

ParameterType
rownumber
columnnumber

Returns

undefined | ICellData

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:472


getSheetId()

getSheetId(): string

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:234


getToken()

getToken(): string

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:89


getUnitData()

getUnitData(): IUnitData

Returns

IUnitData

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:289


getUnitId()

getUnitId(): string

Returns

string

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:227


getUnitStylesData()

getUnitStylesData(): IUnitStylesData

Returns

IUnitStylesData

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:297


isArray()

isArray(): boolean

Returns

boolean

Inherited from

ObjectClassType.isArray

Defined in

submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:52


isAsyncArrayObject()

isAsyncArrayObject(): boolean

Returns

boolean

Inherited from

ObjectClassType.isAsyncArrayObject

Defined in

submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:44


isAsyncObject()

isAsyncObject(): boolean

Returns

boolean

Inherited from

ObjectClassType.isAsyncObject

Defined in

submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:40


isCell()

isCell(): boolean

Returns

boolean

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:361


isColumn()

isColumn(): boolean

Returns

boolean

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:365


isEqualType()

isEqualType(object): boolean

Parameters

ParameterType
objectObjectClassType

Returns

boolean

Inherited from

ObjectClassType.isEqualType

Defined in

submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:60


isError()

isError(): boolean

Returns

boolean

Inherited from

ObjectClassType.isError

Defined in

submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:36


isExceedRange()

isExceedRange(): boolean

Returns

boolean

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:97


isRange()

isRange(): boolean

Returns

boolean

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:373


isReferenceObject()

isReferenceObject(): boolean

Returns

boolean

Overrides

ObjectClassType.isReferenceObject

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:146


isRow()

isRow(): boolean

Returns

boolean

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:369


isTable()

isTable(): boolean

Returns

boolean

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:377


isValueObject()

isValueObject(): boolean

Returns

boolean

Inherited from

ObjectClassType.isValueObject

Defined in

submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:56


iterator()

iterator(callback): Nullable<boolean>

Parameters

ParameterType
callback(valueObject, rowIndex, columnIndex) => Nullable<boolean>

Returns

Nullable<boolean>

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:150


setArrayFormulaCellData()

setArrayFormulaCellData(unitData): void

Parameters

ParameterType
unitDataIRuntimeUnitDataType

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:317


setDefaultSheetId()

setDefaultSheetId(sheetId): void

Parameters

ParameterType
sheetIdstring

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:273


setDefaultUnitId()

setDefaultUnitId(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:281


setForcedSheetId()

setForcedSheetId(sheetNameMap): void

Parameters

ParameterType
sheetNameMapIUnitSheetNameMap

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:251


setForcedSheetIdDirect()

setForcedSheetIdDirect(sheetId): void

Parameters

ParameterType
sheetIdstring

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:255


setForcedSheetName()

setForcedSheetName(sheetName): void

Parameters

ParameterType
sheetNamestring

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:263


setForcedUnitIdDirect()

setForcedUnitIdDirect(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:241


setPattern()

setPattern(pattern): void

Only used in NumberValueObject

Parameters

ParameterType
patternstring

Returns

void

Inherited from

ObjectClassType.setPattern

Defined in

submodules/univer/packages/engine-formula/src/basics/object-class-type.ts:32


setRangeData()

setRangeData(range): void

Parameters

ParameterType
rangeIRange

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:223


setRefOffset()

setRefOffset(x, y): void

Parameters

ParameterTypeDefault value
xnumber0
ynumber0

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:106


setRuntimeArrayFormulaCellData()

setRuntimeArrayFormulaCellData(unitData): void

Parameters

ParameterType
unitDataIRuntimeUnitDataType

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:325


setRuntimeData()

setRuntimeData(runtimeData): void

Parameters

ParameterType
runtimeDataIRuntimeUnitDataType

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:309


setRuntimeFeatureCellData()

setRuntimeFeatureCellData(unitData): void

Parameters

ParameterType
unitDataobject

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:333


setToken()

setToken(token): void

Parameters

ParameterType
tokenstring

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:93


setUnitData()

setUnitData(unitData): void

Parameters

ParameterType
unitDataIUnitData

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:293


setUnitStylesData()

setUnitStylesData(unitStylesData): void

Parameters

ParameterType
unitStylesDataIUnitStylesData

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:301


toArrayValueObject()

toArrayValueObject(useCache): ArrayValueObject

Parameters

ParameterTypeDefault value
useCachebooleantrue

Returns

ArrayValueObject

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:522


toUnitRange()

toUnitRange(): {
  range: {
     endAbsoluteRefType: AbsoluteRefType;
     endColumn: number;
     endRow: number;
     rangeType: RANGE_TYPE;
     sheetId: string;
     startAbsoluteRefType: AbsoluteRefType;
     startColumn: number;
     startRow: number;
     unitId: string;
    };
  sheetId: string;
  unitId: string;
}

Returns

{
  range: {
     endAbsoluteRefType: AbsoluteRefType;
     endColumn: number;
     endRow: number;
     rangeType: RANGE_TYPE;
     sheetId: string;
     startAbsoluteRefType: AbsoluteRefType;
     startColumn: number;
     startRow: number;
     unitId: string;
    };
  sheetId: string;
  unitId: string;
}
NameTypeDescriptionDefined in
range{ endAbsoluteRefType: AbsoluteRefType; endColumn: number; endRow: number; rangeType: RANGE_TYPE; sheetId: string; startAbsoluteRefType: AbsoluteRefType; startColumn: number; startRow: number; unitId: string; }-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:574
range.endAbsoluteRefType?AbsoluteRefType-submodules/univer/packages/core/src/sheets/typedef.ts:442
range.endColumnnumber-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:142
range.endRownumber-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:140
range.rangeType?RANGE_TYPE-submodules/univer/packages/core/src/sheets/typedef.ts:438
range.sheetId?stringId 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.submodules/univer/packages/core/src/sheets/typedef.ts:391
range.startAbsoluteRefType?AbsoluteRefType-submodules/univer/packages/core/src/sheets/typedef.ts:440
range.startColumnnumber-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:141
range.startRownumber-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:139
range.unitId?stringId 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.submodules/univer/packages/core/src/sheets/typedef.ts:385
sheetIdstring-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:575
unitIdstring-submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:576

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:572


unionBy()

unionBy(referenceObject): NodeValueType

Parameters

ParameterType
referenceObjectBaseReferenceObject

Returns

NodeValueType

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:381


unionRange()

unionRange(rangeData1, rangeData2): IRange

Parameters

ParameterType
rangeData1IRange
rangeData2IRange

Returns

IRange

Defined in

submodules/univer/packages/engine-formula/src/engine/reference-object/base-reference-object.ts:386