指南Univer Sheets功能高阶公式Pro

高阶公式 0.5.0+

Facade API付费版本需要 Univer 服务端Univer on Node.jsPreset
-UniverSheetsAdvancedPreset

Univer 高级版公式提供了新的计算引擎,在计算性能上进行了优化。

该功能包含以下插件包:

Presets 安装

import { createUniver, defaultTheme, LocaleType, Tools } from '@univerjs/presets';
import { UniverSheetsCorePreset } from '@univerjs/presets/preset-sheets-core';
import UniverPresetSheetsCoreZhCN from '@univerjs/presets/preset-sheets-core/locales/zh-CN';
import { UniverSheetsAdvancedPreset } from '@univerjs/presets/preset-sheets-advanced';
import UniverPresetSheetsAdvancedZhCN from '@univerjs/presets/preset-sheets-advanced/locales/zh-CN';
import { UniverSheetsDrawingPreset } from '@univerjs/presets/preset-sheets-drawing'
import UniverPresetSheetsDrawingZhCN from '@univerjs/presets/preset-sheets-drawing/locales/zh-CN'
 
import '@univerjs/presets/lib/styles/preset-sheets-core.css'
import '@univerjs/presets/lib/styles/preset-sheets-drawing.css'
import '@univerjs/presets/lib/styles/preset-sheets-advanced.css'
 
const { univerAPI } = createUniver({
  locale: LocaleType.ZH_CN,
  locales: {
    zhCN: Tools.deepMerge(
      {},
      UniverPresetSheetsCoreZhCN,
      UniverPresetSheetsDrawingZhCN,
      UniverPresetSheetsAdvancedZhCN,
    ),
  },
  theme: defaultTheme,
  presets: [
    UniverSheetsCorePreset(),
    UniverSheetsDrawingPreset(),
    UniverSheetsAdvancedPreset(),
  ],
});

手动组合安装

npm install @univerjs-pro/engine-formula
import { LocaleType, Tools } from '@univerjs/core';
- import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula'
import { UniverProFormulaEnginePlugin } from '@univerjs-pro/engine-formula'
 
- univer.registerPlugin(UniverFormulaEnginePlugin);
+ univer.registerPlugin(UniverProFormulaEnginePlugin);

Facade API

参考 公式 Facade API 章节。


这个页面对您有帮助吗?