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


Class: FormulaDataModel

Extends

Constructors

new FormulaDataModel()

new FormulaDataModel(_univerInstanceService, _lexerTreeBuilder): FormulaDataModel

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService
_lexerTreeBuilderLexerTreeBuilder

Returns

FormulaDataModel

Overrides

Disposable.constructor

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:47

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93

Methods

clearPreviousArrayFormulaCellData()

clearPreviousArrayFormulaCellData(clearArrayFormulaCellData): void

Parameters

ParameterType
clearArrayFormulaCellDataIRuntimeUnitDataType

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:63


deleteArrayFormulaRange()

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

Parameters

ParameterType
unitIdstring
sheetIdstring
rownumber
columnnumber

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:258


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:56


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getArrayFormulaCellData()

getArrayFormulaCellData(): IArrayFormulaUnitCellType

Returns

IArrayFormulaUnitCellType

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:176


getArrayFormulaRange()

getArrayFormulaRange(): IArrayFormulaRangeType

Returns

IArrayFormulaRangeType

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:168


getCalculateData()

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

Returns

{
  allUnitData: IUnitData;
  unitSheetNameMap: IUnitSheetNameMap;
}
NameTypeDefined in
allUnitDataIUnitDatasubmodules/univer/packages/engine-formula/src/models/formula-data.model.ts:337
unitSheetNameMapIUnitSheetNameMapsubmodules/univer/packages/engine-formula/src/models/formula-data.model.ts:338

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:299


getFormulaData()

getFormulaData(): IFormulaData

Returns

IFormulaData

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:160


getFormulaDataItem()

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

Parameters

ParameterType
rownumber
columnnumber
sheetIdstring
unitIdstring

Returns

Nullable<IFormulaDataItem>

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:492


getFormulaDirtyRanges()

getFormulaDirtyRanges(): IUnitRange[]

Function to get all formula ranges

Returns

IUnitRange[]

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:573


getFormulaIdMap()

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

Parameters

ParameterType
unitIdstring
sheetIdstring

Returns

Map<string, IFormulaIdMap>

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:496


getFormulaItemBySId()

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

Parameters

ParameterType
sIdstring
sheetIdstring
unitIdstring

Returns

Nullable<IFormulaDataItem>

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:462


getFormulaStringByCell()

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

Parameters

ParameterType
rownumber
columnnumber
sheetIdstring
unitIdstring

Returns

null | string

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:525


initFormulaData()

initFormulaData(): void

Cache all formulas on the snapshot to the formula model

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:277


mergeArrayFormulaCellData()

mergeArrayFormulaCellData(unitData): void

Parameters

ParameterType
unitDataIRuntimeUnitDataType

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:111


mergeArrayFormulaRange()

mergeArrayFormulaRange(formulaData): void

Parameters

ParameterType
formulaDataIArrayFormulaRangeType

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:184


mergeFormulaData()

mergeFormulaData(formulaData): void

Parameters

ParameterType
formulaDataIFormulaData

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:211


setArrayFormulaCellData()

setArrayFormulaCellData(value): void

Parameters

ParameterType
valueIArrayFormulaUnitCellType

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:180


setArrayFormulaRange()

setArrayFormulaRange(value): void

Parameters

ParameterType
valueIArrayFormulaRangeType

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:172


setFormulaData()

setFormulaData(value): void

Parameters

ParameterType
valueIFormulaData

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:164


updateArrayFormulaCellData()

updateArrayFormulaCellData(
   unitId, 
   sheetId, 
   cellValue): void

Parameters

ParameterType
unitIdstring
sheetIdstring
cellValueIObjectMatrixPrimitiveType<Nullable<ICellData>>

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:436


updateArrayFormulaRange()

updateArrayFormulaRange(
   unitId, 
   sheetId, 
   cellValue): void

Parameters

ParameterType
unitIdstring
sheetIdstring
cellValueIObjectMatrixPrimitiveType<Nullable<ICellData>>

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:417


updateFormulaData()

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

Parameters

ParameterType
unitIdstring
sheetIdstring
cellValueIObjectMatrixPrimitiveType<Nullable<ICellData>>

Returns

IObjectMatrixPrimitiveType<null | IFormulaDataItem>

Defined in

submodules/univer/packages/engine-formula/src/models/formula-data.model.ts:342