# @univerjs-pro/sheets-pivot

> Language fallback: requested `ko-KR`; content is `en-US`.

- Human documentation: [https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs-pro/sheets-pivot](https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs-pro/sheets-pivot)

- Agent Markdown: [https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs-pro/sheets-pivot.md](https://docs.univer.ai/ko-KR/reference/packages/plugins/univerjs-pro/sheets-pivot.md)

- Requested language: `ko-KR`

- Content language: `en-US`

- Documentation version: `1.0.4`

- Source: [packages/plugins/univerjs-pro/sheets-pivot.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/packages/plugins/univerjs-pro/sheets-pivot.mdx)

---

Pivot table integration for Univer Sheets.

```typescript
// [!code word:UniverSheetsPivotTablePlugin]
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](https://docs.univer.ai/ko-KR/guides/sheets/features/pivot-chart.md#copy-and-delete-sheets) agree on the new IDs and source mappings.

## IUniverSheetsPivotConfig

```ts
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
}
```
