API 参考

@univerjs-pro/sheets-pivot

本 API 页面目前提供英文正文。代码签名与标识符不随界面语言变化。

Pivot table integration for Univer Sheets.

TypeScript
import { UniverSheetsPivotTablePlugin } from '@univerjs-pro/sheets-pivot'univer.registerPlugin(UniverSheetsPivotTablePlugin, {})

Entry Points

  • Facade: @univerjs-pro/sheets-pivot/facade
  • Locale: @univerjs-pro/sheets-pivot/locale/*

Worksheet copy integrations

The root entry exports helpers for plugins that participate in worksheet copying:

  • getOrCreatePivotSheetCopyPlan() creates or reuses a plan in the operation’s shared copy context. The plan includes copied entries, a PivotTable ID map, and a shared data-field remapping context.
  • PIVOT_SHEET_COPY_CONTEXT_KEY identifies that plan in the copy context.
  • remapPivotReportDataFields() remaps a report’s collection and field configuration in place using the shared context. Pass the copied report data, not the original source report.
  • IPivotSheetCopyPlan, IPivotSheetCopyPlanEntry, IPivotSheetCopyScope, IPivotSheetCopySource, and IPivotSheetDataFieldCopyContext describe these inputs and results.

Use one shared copy context per worksheet-copy operation so PivotTables and PivotCharts agree on the new IDs and source mappings.

IUniverSheetsPivotConfig

TypeScript
export interface IUniverSheetsPivotConfig {  notExecuteFormula?: boolean  // When the user configures this property,  // if there are cells containing data in the pivot table next view range,  // they will be directly overwritten without popping up a dialog box for the user to select.  defaultOverride?: boolean  /**   * Define the maximum number of items that can be displayed in a single pivot table field. The default value is 1000.   */  maxLimitItemCount?: number}

你觉得这篇文档如何?

© 2026 DreamNum Co., Ltd.