# PivotStyle

> PivotStyle interface in the Node.js TypeScript API: Portable pivot presentation. Colors are #RRGGBB; row/column banding is independent of the built-in style.

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

---

Portable pivot presentation. Colors are #RRGGBB; row/column banding is independent of the built-in style.

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/pivotstyle/name-property/llms-full.txt) | The `name` setting of `PivotStyle`. See the syntax for its supported type and the example for a complete report configuration. |
| [headerColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/headercolor-property/llms-full.txt) | The `headerColor` setting of `PivotStyle`. See the syntax for its supported type and the example for a complete report configuration. |
| [headerTextColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/headertextcolor-property/llms-full.txt) | The `headerTextColor` setting of `PivotStyle`. See the syntax for its supported type and the example for a complete report configuration. |
| [subtotalColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/subtotalcolor-property/llms-full.txt) | The `subtotalColor` setting of `PivotStyle`. See the syntax for its supported type and the example for a complete report configuration. |
| [grandTotalColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/grandtotalcolor-property/llms-full.txt) | The `grandTotalColor` setting of `PivotStyle`. See the syntax for its supported type and the example for a complete report configuration. |
| [bandColor](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/bandcolor-property/llms-full.txt) | The `bandColor` setting of `PivotStyle`. See the syntax for its supported type and the example for a complete report configuration. |
| [rowBanding](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/rowbanding-property/llms-full.txt) | The `rowBanding` setting of `PivotStyle`. See the syntax for its supported type and the example for a complete report configuration. |
| [columnBanding](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/columnbanding-property/llms-full.txt) | The `columnBanding` setting of `PivotStyle`. 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 { 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

- [PivotStyle.bandColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/bandcolor-property/llms-full.txt): PivotStyle.bandColor property in the TX Sheet Control TypeScript API for Node.js: Alternating fill color used when rowBanding or columnBanding is enabled.
- [PivotStyle.columnBanding Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/columnbanding-property/llms-full.txt): PivotStyle.columnBanding property in the TX Sheet Control TypeScript API for Node.js: Applies bandColor to alternate columns.
- [PivotStyle.grandTotalColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/grandtotalcolor-property/llms-full.txt): PivotStyle.grandTotalColor property in the TX Sheet Control TypeScript API for Node.js: Fill color for grand-total rows.
- [PivotStyle.headerColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/headercolor-property/llms-full.txt): PivotStyle.headerColor property in the TX Sheet Control TypeScript API for Node.js: Header fill in #RRGGBB notation. Set headerTextColor for readable contrast.
- [PivotStyle.headerTextColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/headertextcolor-property/llms-full.txt): PivotStyle.headerTextColor property in the TX Sheet Control TypeScript API for Node.js: Header text color in #RRGGBB notation.
- [PivotStyle.name Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/name-property/llms-full.txt): PivotStyle.name property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.
- [PivotStyle.rowBanding Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/rowbanding-property/llms-full.txt): PivotStyle.rowBanding property in the TX Sheet Control TypeScript API for Node.js: Applies bandColor to alternate data rows.
- [PivotStyle.subtotalColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/pivotstyle/subtotalcolor-property/llms-full.txt): PivotStyle.subtotalColor property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.

---

## Nearby

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