API Reference
@univerjs
@univerjs/engine-formula
classes
Formuladatamodel

@univerjs/engine-formula v0.4.2Docs


Class: FormulaDataModel

Extends

Constructors

new FormulaDataModel()

new FormulaDataModel(_univerInstanceService, _lexerTreeBuilder): FormulaDataModel

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService
_lexerTreeBuilderLexerTreeBuilder

Returns

FormulaDataModel

Overrides

Disposable.constructor

Defined in

packages/engine-formula/src/models/formula-data.model.ts:47 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)

Methods

clearPreviousArrayFormulaCellData()

clearPreviousArrayFormulaCellData(clearArrayFormulaCellData): void

Parameters

ParameterType
clearArrayFormulaCellDataIRuntimeUnitDataType

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:63 (opens in a new tab)


deleteArrayFormulaRange()

deleteArrayFormulaRange(
   unitId, 
   sheetId, 
   row, 
   column): void

Parameters

ParameterType
unitIdstring
sheetIdstring
rownumber
columnnumber

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:256 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

packages/engine-formula/src/models/formula-data.model.ts:56 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


getArrayFormulaCellData()

getArrayFormulaCellData(): IArrayFormulaUnitCellType

Returns

IArrayFormulaUnitCellType

Defined in

packages/engine-formula/src/models/formula-data.model.ts:176 (opens in a new tab)


getArrayFormulaRange()

getArrayFormulaRange(): IArrayFormulaRangeType

Returns

IArrayFormulaRangeType

Defined in

packages/engine-formula/src/models/formula-data.model.ts:168 (opens in a new tab)


getCalculateData()

getCalculateData(): {
  allUnitData: IUnitData;
  unitSheetNameMap: IUnitSheetNameMap;
}

Returns

{
  allUnitData: IUnitData;
  unitSheetNameMap: IUnitSheetNameMap;
}
NameTypeDefined in
allUnitDataIUnitDatapackages/engine-formula/src/models/formula-data.model.ts:335 (opens in a new tab)
unitSheetNameMapIUnitSheetNameMappackages/engine-formula/src/models/formula-data.model.ts:336 (opens in a new tab)

Defined in

packages/engine-formula/src/models/formula-data.model.ts:297 (opens in a new tab)


getFormulaData()

getFormulaData(): IFormulaData

Returns

IFormulaData

Defined in

packages/engine-formula/src/models/formula-data.model.ts:160 (opens in a new tab)


getFormulaDataItem()

getFormulaDataItem(
   row, 
   column, 
   sheetId, 
unitId): Nullable<IFormulaDataItem>

Parameters

ParameterType
rownumber
columnnumber
sheetIdstring
unitIdstring

Returns

Nullable<IFormulaDataItem>

Defined in

packages/engine-formula/src/models/formula-data.model.ts:490 (opens in a new tab)


getFormulaIdMap()

getFormulaIdMap(unitId, sheetId): Map<string, IFormulaIdMap>

Parameters

ParameterType
unitIdstring
sheetIdstring

Returns

Map<string, IFormulaIdMap>

Defined in

packages/engine-formula/src/models/formula-data.model.ts:494 (opens in a new tab)


getFormulaItemBySId()

getFormulaItemBySId(
   sId, 
   sheetId, 
unitId): Nullable<IFormulaDataItem>

Parameters

ParameterType
sIdstring
sheetIdstring
unitIdstring

Returns

Nullable<IFormulaDataItem>

Defined in

packages/engine-formula/src/models/formula-data.model.ts:460 (opens in a new tab)


getFormulaStringByCell()

getFormulaStringByCell(
   row, 
   column, 
   sheetId, 
   unitId): null | string

Parameters

ParameterType
rownumber
columnnumber
sheetIdstring
unitIdstring

Returns

null | string

Defined in

packages/engine-formula/src/models/formula-data.model.ts:523 (opens in a new tab)


initFormulaData()

initFormulaData(): void

Cache all formulas on the snapshot to the formula model

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:275 (opens in a new tab)


mergeArrayFormulaCellData()

mergeArrayFormulaCellData(unitData): void

Parameters

ParameterType
unitDataIRuntimeUnitDataType

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:111 (opens in a new tab)


mergeArrayFormulaRange()

mergeArrayFormulaRange(formulaData): void

Parameters

ParameterType
formulaDataIArrayFormulaRangeType

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:184 (opens in a new tab)


mergeFormulaData()

mergeFormulaData(formulaData): void

Parameters

ParameterType
formulaDataIFormulaData

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:211 (opens in a new tab)


setArrayFormulaCellData()

setArrayFormulaCellData(value): void

Parameters

ParameterType
valueIArrayFormulaUnitCellType

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:180 (opens in a new tab)


setArrayFormulaRange()

setArrayFormulaRange(value): void

Parameters

ParameterType
valueIArrayFormulaRangeType

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:172 (opens in a new tab)


setFormulaData()

setFormulaData(value): void

Parameters

ParameterType
valueIFormulaData

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:164 (opens in a new tab)


updateArrayFormulaCellData()

updateArrayFormulaCellData(
   unitId, 
   sheetId, 
   cellValue): void

Parameters

ParameterType
unitIdstring
sheetIdstring
cellValueIObjectMatrixPrimitiveType<Nullable<ICellData>>

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:434 (opens in a new tab)


updateArrayFormulaRange()

updateArrayFormulaRange(
   unitId, 
   sheetId, 
   cellValue): void

Parameters

ParameterType
unitIdstring
sheetIdstring
cellValueIObjectMatrixPrimitiveType<Nullable<ICellData>>

Returns

void

Defined in

packages/engine-formula/src/models/formula-data.model.ts:415 (opens in a new tab)


updateFormulaData()

updateFormulaData(
   unitId, 
   sheetId, 
cellValue): IObjectMatrixPrimitiveType<null | IFormulaDataItem>

Parameters

ParameterType
unitIdstring
sheetIdstring
cellValueIObjectMatrixPrimitiveType<Nullable<ICellData>>

Returns

IObjectMatrixPrimitiveType<null | IFormulaDataItem>

Defined in

packages/engine-formula/src/models/formula-data.model.ts:340 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.