@univerjs/engine-formula v0.5.0-beta.1 • Docs
Class: CalculateFormulaService
Extends
Constructors
new CalculateFormulaService()
new CalculateFormulaService(
_configService,
_lexer,
_currentConfigService,
_runtimeService,
_formulaDependencyGenerator,
_interpreter,
_astTreeBuilder): CalculateFormulaService
Parameters
Parameter | Type |
---|---|
_configService | IConfigService |
_lexer | Lexer |
_currentConfigService | IFormulaCurrentConfigService |
_runtimeService | IFormulaRuntimeService |
_formulaDependencyGenerator | IFormulaDependencyGenerator |
_interpreter | Interpreter |
_astTreeBuilder | AstTreeBuilder |
Returns
Overrides
Defined in
submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:85
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:92 |
_configService | readonly | IConfigService | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:86 |
_currentConfigService | readonly | IFormulaCurrentConfigService | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:88 |
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_executionCompleteListener$ | readonly | Subject <IAllRuntimeData > | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:81 |
_executionInProgressListener$ | readonly | Subject <IExecutionInProgressParams > | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:77 |
_formulaDependencyGenerator | readonly | IFormulaDependencyGenerator | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:90 |
_interpreter | readonly | Interpreter | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:91 |
_lexer | readonly | Lexer | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:87 |
_runtimeService | readonly | IFormulaRuntimeService | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:89 |
executionCompleteListener$ | readonly | Observable <IAllRuntimeData > | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:83 |
executionInProgressListener$ | readonly | Observable <IExecutionInProgressParams > | undefined | - | submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:79 |
Methods
_apply()
protected _apply(isArrayFormulaState): Promise<undefined | IAllRuntimeData>
Parameters
Parameter | Type | Default value |
---|---|---|
isArrayFormulaState | boolean | false |
Returns
Promise
<undefined
| IAllRuntimeData
>
Defined in
submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:241
calculate()
calculate(formulaString, transformSuffix): undefined | ErrorNode
Parameters
Parameter | Type | Default value |
---|---|---|
formulaString | string | undefined |
transformSuffix | boolean | true |
Returns
undefined
| ErrorNode
Defined in
submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:361
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:106
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
execute()
execute(formulaDatasetConfig): Promise<void>
Parameters
Parameter | Type |
---|---|
formulaDatasetConfig | IFormulaDatasetConfig |
Returns
Promise
<void
>
Defined in
submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:119
setRuntimeFeatureCellData()
setRuntimeFeatureCellData(featureId, featureData): void
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
Defined in
submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:111
setRuntimeFeatureRange()
setRuntimeFeatureRange(featureId, featureRange): void
Parameters
Parameter | Type |
---|---|
featureId | string |
featureRange | IFeatureDirtyRangeType |
Returns
void
Defined in
submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:115
stopFormulaExecution()
stopFormulaExecution(): void
Stop the execution of the formula.
Returns
void
Defined in
submodules/univer/packages/engine-formula/src/services/calculate-formula.service.ts:100