API Reference
@univerjs
@univerjs/engine-formula
Readme

@univerjs/engine-formula v0.4.2Docs


@univerjs/engine-formula

Enumerations

EnumerationDescription
BooleanValue-
ErrorTypeCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_ARRAYCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_COMPATIBILITYCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_CUBECopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_DATABASECopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_DATECopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_ENGINEERINGCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_FINANCIALCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_INFORMATIONCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_LOGICALCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_LOOKUPCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_MATHCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_STATISTICALCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_TEXTCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_UNIVERCopyright 2023-present DreamNum Inc.
FUNCTION_NAMES_WEBCopyright 2023-present DreamNum Inc.
FormulaExecuteStageTypeIDLE: Idle phase of the formula engine.
FormulaExecutedStateType-
FunctionTypeFunction type, refer to https://support.microsoft.com/en-us/office/excel-functions-by-category-5f91f4e9-7b42-46d2-9bd1-63f26a86c0eb (opens in a new tab)
compareToken-
matchToken-
operatorTokenCopyright 2023-present DreamNum Inc.
sequenceNodeType-

Classes

ClassDescription
ActiveDirtyManagerServiceActively mark as dirty, calculate the dirty area based on the command, and plugins can register the ref range they affect into the formula engine.
ArrayValueObject-
AstRootNodeFactory-
AstTreeBuilder-
AsyncArrayObject-
AsyncObject-
BaseFunction-
BaseReferenceObject-
BaseValueObject-
BooleanValueObject-
CalculateController-
CalculateFormulaService-
CustomFunction-
DefinedNamesService-
DependencyManagerServicePassively marked as dirty, register the reference and execution actions of the feature plugin. After execution, a dirty area and calculated data will be returned, causing the formula to be marked dirty again, thereby completing the calculation of the entire dependency tree.
ErrorValueObject-
FeatureCalculationManagerServicePassively marked as dirty, register the reference and execution actions of the feature plugin. After execution, a dirty area and calculated data will be returned, causing the formula to be marked dirty again, thereby completing the calculation of the entire dependency tree.
FormulaCurrentConfigService-
FormulaDataModel-
FormulaDependencyGenerator-
FormulaRuntimeService-
FunctionNodeFactory-
FunctionService-
Interpreter-
LambdaNodeFactory-
LambdaParameterNodeFactory-
Lexer-
LexerNode-
LexerTreeBuilder-
NullValueObject-
NumberValueObject-
OperatorNodeFactory-
OtherFormulaManagerServicePassively marked as dirty, register the reference and execution actions of the feature plugin. After execution, a dirty area and calculated data will be returned, causing the formula to be marked dirty again, thereby completing the calculation of the entire dependency tree.
PrefixNodeFactory-
RangeReferenceObject-
ReferenceNodeFactory-
SetDefinedNameController-
StringValueObject-
SuffixNodeFactory-
SuperTableService-
UnionNodeFactory-
UniverFormulaEnginePluginPlug-in base class, all plug-ins must inherit from this base class. Provide basic methods.
ValueNodeFactory-
ValueObjectFactory-

Interfaces

InterfaceDescription
IAbsoluteRefTypeForRange-
IActiveDirtyManagerService-
IAllRuntimeData-
IArrayFormulaRangeType-
IArrayFormulaUnitCellType-
IDefinedNameMapItem-
IDefinedNamesService-
IDefinedNamesServiceParam-
IDependencyManagerService-
IDirtyUnitFeatureMap-
IDirtyUnitOtherFormulaMap-
IDirtyUnitSheetDefinedNameMap-
IDirtyUnitSheetNameMap-
IExecutionInProgressParams-
IFeatureCalculationManagerService-
IFeatureDirtyRangeType-
IFormulaCurrentConfigService-
IFormulaData-
IFormulaDataItem-
IFormulaDatasetConfig-
IFormulaDirtyData-
IFormulaRuntimeService-
IFunctionInfo-
IFunctionParam-
IFunctionService-
IOtherFormulaManagerService-
IRangeChange-
IRemoveOtherFormulaMutationParams-
IRuntimeUnitDataType-
ISequenceNode-
ISetArrayFormulaDataMutationParams-
ISetDefinedNameMutationParam-
ISetDefinedNameMutationSearchParam-
ISetFormulaCalculationNotificationMutation-
ISetFormulaCalculationResultMutation-
ISetFormulaCalculationStartMutation-
ISetFormulaDataMutationParams-
ISetOtherFormulaMutationParams-
ISheetData-
ISuperTableService-
IUnitDataThe subset of workbook data needs to be assembled into a new reference object when being passed in, and then input through the FormulaCurrentConfigService.
IUnitSheetNameMap-

Type Aliases

Type aliasDescription
FunctionVariantType-
IFunctionNames-
PrimitiveValueType-

Variables

VariableDescription
ERROR_TYPE_SET-
RegisterFunctionMutation-
RemoveDefinedNameMutation-
RemoveFeatureCalculationMutation-
RemoveOtherFormulaMutation-
RemoveSuperTableMutation-
SetArrayFormulaDataMutationThere is no need to process data here, it is used as the main thread to send data to the worker. The main thread has already updated the data in advance, and there is no need to update it again here.
SetDefinedNameMutationIn the formula engine, the mutation is solely responsible for communication between the worker and the main thread. It requires setting local to true during execution.
SetFeatureCalculationMutationIn the formula engine, the mutation is solely responsible for communication between the worker and the main thread. It requires setting local to true during execution.
SetFormulaCalculationNotificationMutation-
SetFormulaCalculationResultMutation-
SetFormulaCalculationStartMutationTODO: @DR-Univer Trigger the calculation of the formula and stop the formula
SetFormulaCalculationStopMutation-
SetFormulaDataMutationThere is no need to process data here, it is used as the main thread to send data to the worker. The main thread has already updated the data in advance, and there is no need to update it again here.
SetOtherFormulaMutationIn the formula engine, the mutation is solely responsible for communication between the worker and the main thread. It requires setting local to true during execution.
SetSuperTableMutationIn the formula engine, the mutation is solely responsible for communication between the worker and the main thread. It requires setting local to true during execution.
SetSuperTableOptionMutation-
functionArrayCopyright 2023-present DreamNum Inc.
functionCompatibility-
functionCubeCopyright 2023-present DreamNum Inc.
functionDatabase-
functionDate-
functionEngineering-
functionFinancial-
functionInformation-
functionLogical-
functionLookup-
functionMath-
functionMeta-
functionStatistical-
functionText-
functionUniverCopyright 2023-present DreamNum Inc.
functionWebCopyright 2023-present DreamNum Inc.

Functions

FunctionDescription
IActiveDirtyManagerService-
IDefinedNamesService-
IDependencyManagerService-
IFeatureCalculationManagerService-
IFormulaCurrentConfigService-
IFormulaRuntimeService-
IFunctionService-
IOtherFormulaManagerService-
ISuperTableService-
SetDefinedNameMutationFactory-
convertUnitDataToRuntime-
deserializeRangeForR1C1-
deserializeRangeWithSheet-
deserializeRangeWithSheetWithCache-
generateStringWithSequenceDeserialize Sequence to text.
getAbsoluteRefTypeWitString-
getAbsoluteRefTypeWithSingleString-
getRangeWithRefsStringimplement getSheetIdByName function getSheetIdByName(name: string) { return univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET)?.getSheetBySheetName(name)?.getSheetId()
handleNumfmtInCellHandling number formats in styles
handleRefStringInfo-
includeFormulaLexerToken-
initSheetFormulaData-
isFormulaLexerToken-
isInDirtyRange-
isReferenceString-
isReferenceStringWithEffectiveColumn-
isReferenceStrings-
matchRefDrawTokenDetermine whether the character is a token keyword for the formula engine.
normalizeSheetName-
serializeRangeSerialize an IRange into a string.
serializeRangeToRefString-
serializeRangeWithSheetSerialize an IRange and a sheetID into a string.
serializeRangeWithSpreadsheetSerialize an IRange and a sheetID into a string.
singleReferenceToGrid-
stripComplete the number to the specified accuracy and solve the accuracy error,
stripErrorMarginTolerance for the results of accuracy issues to tolerate certain errors

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