@univerjs-pro/engine-formula v0.5.4
Class: CalculateFormulaService
Defined in: submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:74
Extends
Constructors
new CalculateFormulaService()
new CalculateFormulaService(
_configService,
_lexer,
_currentConfigService,
_runtimeService,
_formulaDependencyGenerator,
_interpreter,
_astTreeBuilder): CalculateFormulaService
Defined in: submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:83
Parameters
Parameter | Type |
---|---|
_configService | IConfigService |
_lexer | Lexer |
_currentConfigService | IFormulaCurrentConfigService |
_runtimeService | IFormulaRuntimeService |
_formulaDependencyGenerator | IFormulaDependencyGenerator |
_interpreter | Interpreter |
_astTreeBuilder | AstTreeBuilder |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_astTreeBuilder | readonly | AstTreeBuilder | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:90 |
_configService | readonly | IConfigService | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:84 |
_currentConfigService | readonly | IFormulaCurrentConfigService | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:86 |
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
_executionCompleteListener$ | readonly | Subject <IAllRuntimeData > | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:79 |
_executionInProgressListener$ | readonly | Subject <IExecutionInProgressParams > | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:75 |
_formulaDependencyGenerator | readonly | IFormulaDependencyGenerator | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:88 |
_interpreter | readonly | Interpreter | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:89 |
_lexer | readonly | Lexer | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:85 |
_runtimeService | readonly | IFormulaRuntimeService | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:87 |
executionCompleteListener$ | readonly | Observable <IAllRuntimeData > | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:81 |
executionInProgressListener$ | readonly | Observable <IExecutionInProgressParams > | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:77 |
Methods
_apply()
protected _apply(isArrayFormulaState): Promise<undefined | IAllRuntimeData>
Defined in: submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:238
Parameters
Parameter | Type | Default value |
---|---|---|
isArrayFormulaState | boolean | false |
Returns
Promise
<undefined
| IAllRuntimeData
>
calculate()
calculate(formulaString, transformSuffix): undefined | ErrorNode
Defined in: submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:358
Parameters
Parameter | Type | Default value |
---|---|---|
formulaString | string | undefined |
transformSuffix | boolean | true |
Returns
undefined
| ErrorNode
dispose()
dispose(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
execute()
execute(formulaDatasetConfig): Promise<void>
Defined in: submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:117
Parameters
Parameter | Type |
---|---|
formulaDatasetConfig | IFormulaDatasetConfig |
Returns
Promise
<void
>
setRuntimeFeatureCellData()
setRuntimeFeatureCellData(featureId, featureData): void
Defined in: submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:109
When the feature is loading, the pre-calculated content needs to be input to the formula engine in advance, so that the formula can read the correct values.
Parameters
Parameter | Type |
---|---|
featureId | string |
featureData | IRuntimeUnitDataType |
Returns
void
setRuntimeFeatureRange()
setRuntimeFeatureRange(featureId, featureRange): void
Defined in: submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:113
Parameters
Parameter | Type |
---|---|
featureId | string |
featureRange | IFeatureDirtyRangeType |
Returns
void
stopFormulaExecution()
stopFormulaExecution(): void
Defined in: submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:98
Stop the execution of the formula.
Returns
void