# PivotTableOptions

> PivotTableOptions interface in the TX Sheet Control TypeScript API for Node.js, with its syntax and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > PivotTableOptions
- **2314 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/llms-full.txt

---

Persisted PivotTable settings; output uses ordinary worksheet cells and is included in worksheet PDF exports.

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

### Members

| Member | Description |
|---|---|
| [name](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/name-property/llms-full.txt) | The `name` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [source](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/source-property/llms-full.txt) | The `source` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [destination](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/destination-property/llms-full.txt) | The `destination` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [rows](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/rows-property/llms-full.txt) | The `rows` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [columns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/columns-property/llms-full.txt) | The `columns` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [values](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/values-property/llms-full.txt) | The `values` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [filters](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/filters-property/llms-full.txt) | The `filters` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [calculatedFields](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/calculatedfields-property/llms-full.txt) | The `calculatedFields` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [layout](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/layout-property/llms-full.txt) | The `layout` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [subtotals](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/subtotals-property/llms-full.txt) | The `subtotals` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [rowGrandTotals](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/rowgrandtotals-property/llms-full.txt) | The `rowGrandTotals` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [columnGrandTotals](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/columngrandtotals-property/llms-full.txt) | The `columnGrandTotals` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [repeatLabels](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/repeatlabels-property/llms-full.txt) | The `repeatLabels` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [showHeaders](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showheaders-property/llms-full.txt) | The `showHeaders` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [showFieldButtons](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showfieldbuttons-property/llms-full.txt) | The `showFieldButtons` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [autoRefresh](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/autorefresh-property/llms-full.txt) | The `autoRefresh` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [emptyText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/emptytext-property/llms-full.txt) | The `emptyText` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [style](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/style-property/llms-full.txt) | The `style` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |
| [chartBindings](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/chartbindings-property/llms-full.txt) | Charts following this pivot output when it grows, moves, or refreshes. |
| [collapsed](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/collapsed-property/llms-full.txt) | The `collapsed` setting of `PivotTableOptions`. See the syntax for its supported type and the example for a complete report configuration. |

\| [mergeLabels](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/mergelabels-property/llms-full.txt) \| Merge repeated column headers and outline/tabular ancestor row labels; default false. \| \| [compactIndent](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/compactindent-property/llms-full.txt) \| Spaces per compact hierarchy level, 0–20; default 2. \| \| [filterAreaLayout](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/filterarealayout-property/llms-full.txt) \| Arrange report-only filters above the report. Omitted keeps the existing output layout. \| \| [filterFieldsPerLine](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/filterfieldsperline-property/llms-full.txt) \| Fields before wrapping down a column or across a row, 0–64; zero uses one column/row. \| \| [errorText](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/errortext-property/llms-full.txt) \| Replacement for source spreadsheet errors and non-finite aggregates; omitted retains normal error behavior. \| \| [autoFitColumns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/autofitcolumns-property/llms-full.txt) \| Fit output column widths from formatted text on refresh, bounded to 48–360 CSS pixels; default false. \| \| [preserveFormatting](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/preserveformatting-property/llms-full.txt) \| Retain existing result-cell formatting by position on refresh unless a new pivot style is applied; default false. \| \| [allowMultipleFiltersPerField](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/allowmultiplefiltersperfield-property/llms-full.txt) \| Allow AND-combined filters for the same field; default true. False rejects duplicate field filters. \| \| [useCustomListsForSorting](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/usecustomlistsforsorting-property/llms-full.txt) \| Use configured lists and built-in month/day orders before alphabetical axis sorting; default false. \| \| [customSortLists](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/customsortlists-property/llms-full.txt) \| Additional ordered lists used when custom-list sorting is enabled; at most 32 lists of 365 distinct labels. \| \| [showExpandCollapseButtons](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showexpandcollapsebuttons-property/llms-full.txt) \| Display independent row hierarchy expand/collapse controls; default true. \| \| [showContextualTooltips](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showcontextualtooltips-property/llms-full.txt) \| Display field and grid-control context tooltips while retaining accessible labels; default true. \| \| [classicLayout](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/classiclayout-property/llms-full.txt) \| Allow field assignment and reordering by dragging visible grid field headers; default false. \| \| [showValuesRow](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showvaluesrow-property/llms-full.txt) \| Show a separate measure-caption header row even for a single measure; default false. \| \| [fieldListSort](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/fieldlistsort-property/llms-full.txt) \| Available-field list order; source order by default. Does not reorder the report axes. \|

### Example

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

```typescript
import { ServerSheetControl as ExampleServer } from '@txtextcontrol/tx-sheet-control-server';
const exampleControl = new ExampleServer();
const workbook = exampleControl.workbook;

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 }
});
exampleControl.destroy();
```

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

---

## In This Section

- [PivotTableOptions.allowMultipleFiltersPerField Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/allowmultiplefiltersperfield-property/llms-full.txt): PivotTableOptions.allowMultipleFiltersPerField property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.autoFitColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/autofitcolumns-property/llms-full.txt): PivotTableOptions.autoFitColumns property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.autoRefresh Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/autorefresh-property/llms-full.txt): PivotTableOptions.autoRefresh property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.calculatedFields Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/calculatedfields-property/llms-full.txt): PivotTableOptions.calculatedFields property in the TX Sheet Control TypeScript API for Node.js, with a TypeScript example.
- [PivotTableOptions.chartBindings Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/chartbindings-property/llms-full.txt): PivotTableOptions.chartBindings property in the Node.js TypeScript API: Charts following this pivot output when it grows, moves, or refreshes.
- [PivotTableOptions.classicLayout Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/classiclayout-property/llms-full.txt): PivotTableOptions.classicLayout property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.collapsed Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/collapsed-property/llms-full.txt): PivotTableOptions.collapsed property in the TX Sheet Control TypeScript API for Node.js, with its syntax and a TypeScript example.
- [PivotTableOptions.columnGrandTotals Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/columngrandtotals-property/llms-full.txt): PivotTableOptions.columnGrandTotals property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.columns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/columns-property/llms-full.txt): PivotTableOptions.columns property in the TX Sheet Control TypeScript API for Node.js, with its type PivotAxisField[] and a TypeScript example.
- [PivotTableOptions.compactIndent Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/compactindent-property/llms-full.txt): PivotTableOptions.compactIndent property in the TX Sheet Control TypeScript API for Node.js: Spaces per compact hierarchy level, 0–20; default 2.
- [PivotTableOptions.customSortLists Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/customsortlists-property/llms-full.txt): PivotTableOptions.customSortLists property in the TX Sheet Control TypeScript API for Node.js, with its type string[][] and a TypeScript example.
- [PivotTableOptions.destination Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/destination-property/llms-full.txt): PivotTableOptions.destination property in the TX Sheet Control TypeScript API for Node.js, with its syntax and a TypeScript example.
- [PivotTableOptions.emptyText Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/emptytext-property/llms-full.txt): PivotTableOptions.emptyText property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.
- [PivotTableOptions.errorText Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/errortext-property/llms-full.txt): PivotTableOptions.errorText property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.
- [PivotTableOptions.fieldListSort Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/fieldlistsort-property/llms-full.txt): PivotTableOptions.fieldListSort property in the TX Sheet Control TypeScript API for Node.js, with its type 'source' | 'ascending' and a TypeScript example.
- [PivotTableOptions.filterAreaLayout Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/filterarealayout-property/llms-full.txt): PivotTableOptions.filterAreaLayout property in the Node.js TypeScript API, with its type 'downThenOver' | 'overThenDown' and a TypeScript example.
- [PivotTableOptions.filterFieldsPerLine Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/filterfieldsperline-property/llms-full.txt): PivotTableOptions.filterFieldsPerLine property in the TX Sheet Control TypeScript API for Node.js, with its type number and a TypeScript example.
- [PivotTableOptions.filters Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/filters-property/llms-full.txt): PivotTableOptions.filters property in the TX Sheet Control TypeScript API for Node.js, with its type PivotFilter[] and a TypeScript example.
- [PivotTableOptions.layout Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/layout-property/llms-full.txt): PivotTableOptions.layout property in the TX Sheet Control TypeScript API for Node.js, with its type 'compact' | 'outline' | 'tabular' and a TypeScript example.
- [PivotTableOptions.mergeLabels Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/mergelabels-property/llms-full.txt): PivotTableOptions.mergeLabels property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.name Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/name-property/llms-full.txt): PivotTableOptions.name property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.
- [PivotTableOptions.preserveFormatting Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/preserveformatting-property/llms-full.txt): PivotTableOptions.preserveFormatting property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.repeatLabels Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/repeatlabels-property/llms-full.txt): PivotTableOptions.repeatLabels property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.rowGrandTotals Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/rowgrandtotals-property/llms-full.txt): PivotTableOptions.rowGrandTotals property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.rows Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/rows-property/llms-full.txt): PivotTableOptions.rows property in the TX Sheet Control TypeScript API for Node.js, with its type PivotAxisField[] and a TypeScript example.
- [PivotTableOptions.showContextualTooltips Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showcontextualtooltips-property/llms-full.txt): PivotTableOptions.showContextualTooltips property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.showExpandCollapseButtons Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showexpandcollapsebuttons-property/llms-full.txt): PivotTableOptions.showExpandCollapseButtons property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.showFieldButtons Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showfieldbuttons-property/llms-full.txt): PivotTableOptions.showFieldButtons property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.showHeaders Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showheaders-property/llms-full.txt): PivotTableOptions.showHeaders property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.showValuesRow Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/showvaluesrow-property/llms-full.txt): PivotTableOptions.showValuesRow property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.source Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/source-property/llms-full.txt): PivotTableOptions.source property in the TX Sheet Control TypeScript API for Node.js, with its type PivotSource and a TypeScript example.
- [PivotTableOptions.style Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/style-property/llms-full.txt): PivotTableOptions.style property in the TX Sheet Control TypeScript API for Node.js, with its type PivotStyle and a TypeScript example.
- [PivotTableOptions.subtotals Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/subtotals-property/llms-full.txt): PivotTableOptions.subtotals property in the TX Sheet Control TypeScript API for Node.js, with its type 'top' | 'bottom' | 'none' and a TypeScript example.
- [PivotTableOptions.useCustomListsForSorting Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/usecustomlistsforsorting-property/llms-full.txt): PivotTableOptions.useCustomListsForSorting property in the TX Sheet Control TypeScript API for Node.js, with its type boolean and a TypeScript example.
- [PivotTableOptions.values Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/values-property/llms-full.txt): PivotTableOptions.values property in the TX Sheet Control TypeScript API for Node.js, with its type PivotValueField[] and a TypeScript example.

---

## Nearby

- **Previous:** [PivotStyle.columnBanding Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/columnbanding-property/llms-full.txt)
- **Next:** [PivotTableOptions.name Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivottableoptions/name-property/llms-full.txt)
