# PivotTableDefinition

> PivotTableDefinition interface in the TX Sheet Control TypeScript API for the browser: Detached persisted identity, settings, and last materialized range.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > PivotTableDefinition
- **2535 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottabledefinition/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottabledefinition/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottabledefinition/llms-full.txt

---

Detached persisted identity, settings, and last materialized range.

Package: `@txtextcontrol/tx-sheet-control`. Obtain operational handles through `workbook.pivotTables`; settings and results are detached values.

### Members

| Member | Description |
|---|---|
| [id](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottabledefinition/id-property/llms-full.txt) | The `id` setting of `PivotTableDefinition`. See the syntax for its supported type and the example for a complete report configuration. |
| [outputRange](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottabledefinition/outputrange-property/llms-full.txt) | The `outputRange` setting of `PivotTableDefinition`. See the syntax for its supported type and the example for a complete report configuration. |

### Example

In a browser use `const workbook = editor.workbook`. In Node.js use your server control workbook.

```typescript
import { Workbook as ExampleWorkbook } from '@txtextcontrol/tx-sheet-control';
const workbook = new ExampleWorkbook();

const source = workbook.sheets.at(0);
source.range('A1:D5').setValues([
    ['Region', 'Category', 'Revenue', 'Cost'],
    ['Europe', 'Software', 1250, 500],
    ['Europe', 'Services', 700, 350],
    ['Americas', 'Software', 1800, 900],
    ['Americas', 'Services', 950, 400]
]);
const report = workbook.sheets.add('Sales Summary');
const pivot = report.pivotTables.add({
    name: 'RegionalSales',
    source: { sheetId: source.id, range: 'A1:D5' },
    destination: { sheetId: report.id, cell: 'B3' },
    rows: [{ field: 'Region' }],
    columns: [{ field: 'Category' }],
    values: [{ field: 'Revenue', caption: 'Sales', numberFormatCode: '$#,##0.00' }],
    layout: 'tabular', style: { rowBanding: true }
});
```

See [Pivot Tables](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/pivot-tables/llms-full.txt) for filtering, calculated values and output.

Inherits the creation settings of [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt).

Inherits the creation settings of [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt).

Inherits the creation settings of [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt).

Inherits the creation settings of [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt).

Inherits the creation settings of [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt).

### Additional and Inherited Members

| Member | Ownership |
|---|---|
| [name](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/name-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [source](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/source-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [destination](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/destination-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [rows](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/rows-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [columns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/columns-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [values](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/values-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [filters](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/filters-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [calculatedFields](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/calculatedfields-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [layout](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/layout-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [subtotals](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/subtotals-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [rowGrandTotals](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/rowgrandtotals-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [columnGrandTotals](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/columngrandtotals-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [repeatLabels](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/repeatlabels-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [showHeaders](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/showheaders-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [showFieldButtons](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/showfieldbuttons-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [autoRefresh](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/autorefresh-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [emptyText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/emptytext-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [mergeLabels](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/mergelabels-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [compactIndent](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/compactindent-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [filterAreaLayout](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/filterarealayout-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [filterFieldsPerLine](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/filterfieldsperline-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [errorText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/errortext-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [autoFitColumns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/autofitcolumns-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [preserveFormatting](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/preserveformatting-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [allowMultipleFiltersPerField](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/allowmultiplefiltersperfield-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [useCustomListsForSorting](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/usecustomlistsforsorting-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [customSortLists](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/customsortlists-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [showExpandCollapseButtons](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/showexpandcollapsebuttons-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [showContextualTooltips](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/showcontextualtooltips-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [classicLayout](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/classiclayout-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [showValuesRow](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/showvaluesrow-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [fieldListSort](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/fieldlistsort-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [style](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/style-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [chartBindings](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/chartbindings-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |
| [collapsed](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/collapsed-property/llms-full.txt) | Inherited from [PivotTableOptions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/llms-full.txt). |

---

## In This Section

- [PivotTableDefinition.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottabledefinition/id-property/llms-full.txt): PivotTableDefinition.id property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.
- [PivotTableDefinition.outputRange Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottabledefinition/outputrange-property/llms-full.txt): PivotTableDefinition.outputRange property in the TX Sheet Control TypeScript API for the browser, with its type string and a TypeScript example.

---

## Nearby

- **Previous:** [PivotTableOptions.fieldListSort Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottableoptions/fieldlistsort-property/llms-full.txt)
- **Next:** [PivotTableDefinition.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/pivottabledefinition/id-property/llms-full.txt)
