@univerjs/engine-formula

GitHubEdit on GitHub

Formula parsing, dependency management, and calculation engine for Univer.

import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula'

univer.registerPlugin(UniverFormulaEnginePlugin, IUniverEngineFormulaConfig)

IUniverEngineFormulaConfig

import type { Ctor } from '@univerjs/core'
import type { IFunctionNames } from '../basics/function'
import type { BaseFunction } from '../functions/base-function'

export interface IUniverEngineFormulaConfig {
  notExecuteFormula?: boolean
  function?: Array<[Ctor<BaseFunction>, IFunctionNames]>

  /**
   * The formula calculation quantity interval for waiting for the main thread message in the worker. Each time the formula calculates the `intervalCount` quantity, it will receive a main thread message to support stopping the calculation. Default is 500
   */
  intervalCount?: number

}