# PivotCsvStreamOptions (@salmonui/export/pivot)

> The PivotCsvStreamOptions interface of @salmonui/export/pivot.

Canonical: https://salmonui.dev/docs/reference/export/pivot/PivotCsvStreamOptions

```ts
import type { PivotCsvStreamOptions } from '@salmonui/export/pivot';
```

Entry index: https://salmonui.dev/docs/reference/export/pivot (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/export/pivot.md).

## Reference

Kind: interface

```ts
interface PivotCsvStreamOptions extends PivotExportOptions, CsvStreamOptions {
    readonly signal?: unknown;
}
```

Members (27):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `signal` | `readonly signal?: unknown;` | optional |  |
| `delimiter` | `delimiter?: string;` | optional, inherited | Default `,`. |
| `lineBreak` | `lineBreak?: string;` | optional, inherited | Default `\r\n` (RFC 4180). |
| `includeHeaders` | `includeHeaders?: boolean;` | optional, inherited | Header line with the leaf header texts. Default true. |
| `values` | `values?: "formatted" \| "raw";` | optional, inherited | `formatted` (default): the column display text. `raw`: numbers and booleans as is, dates as ISO 8601. |
| `aggregateRows` | `aggregateRows?: boolean;` | optional, inherited | Group caption, group footer, and grid footer aggregate lines. Default true. |
| `bom` | `bom?: boolean;` | optional, inherited | Prefix a UTF-8 byte order mark (Excel detects UTF-8). Default false. |
| `quoteAll` | `quoteAll?: boolean;` | optional, inherited | Quote every field instead of only those that need it. Default false. |
| `escapeFormulas` | `escapeFormulas?: boolean;` | optional, inherited | Neutralize spreadsheet formulas in text cells: a leading `'` on tab, CR, or `=`, `+`, `-`, `@` after optional whitespace. Real numbers are kept. Default true; `false` writes raw text. |
| `treeDepthColumn` | `treeDepthColumn?: string \| boolean;` | optional, inherited | Tree mode: a leading column with each row's tree depth (0 for roots). `true` names it `Depth`; a string is the header text. Ignored outside tree mode. |
| `chunkRows` | `chunkRows?: number;` | optional, inherited | Upper bound of rows per chunk. Default 5,000. |
| `sliceMs` | `sliceMs?: number;` | optional, inherited | Time slice per chunk in ms; a chunk ends early when it runs longer. Default 25. |
| `yield` | `yield?: (() => Promise<void>);` | optional, inherited | Awaited between chunks. Default: a macrotask (`setTimeout(0)`) when available, else a resolved promise. |
| `fileName` | `fileName?: string;` | optional, inherited | File name; the extension is added. Default `export`. |
| `rowLayout` | `rowLayout?: "compact" \| "tabular";` | optional, inherited | `compact` (default): one indented row header column; `tabular`: one column per row level. |
| `rowHeaders` | `rowHeaders?: boolean;` | optional, inherited | Row header columns. Default true. |
| `rowHeaderCaption` | `rowHeaderCaption?: string;` | optional, inherited | Header text of the row header column(s). Default: the row field captions. |
| `rowHeaderWidth` | `rowHeaderWidth?: number;` | optional, inherited | Column widths in CSS px. Defaults 200 (row headers) and 110. |
| `columnWidth` | `columnWidth?: number;` | optional, inherited |  |
| `includeColumn` | `includeColumn?: ((header: PivotExportHeader, index: number) => boolean);` | optional, inherited | Exported value columns (hidden columns, current page only). Default every leaf column. |
| `rowRange` | `rowRange?: readonly [number, number];` | optional, inherited | Exported leaf row positions `[start, end)` (current page only). Default every row. |
| `includeRow` | `includeRow?: ((header: PivotExportHeader, index: number) => boolean);` | optional, inherited | Exported rows. Default every visible leaf row. |
| `pivotStyles` | `pivotStyles?: PivotExportStyles;` | optional, inherited | Subtotal, grand total and row header styles (merged under conditional formats and the hook). |
| `cell` | `cell?: ((ctx: PivotExportCellContext) => void \| ExportCellOverride \| null \| undefined);` | optional, inherited | Per body cell. |
| `headerCell` | `headerCell?: ((ctx: PivotExportHeaderContext) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per header cell. |
| `windowCells` | `windowCells?: number;` | optional, inherited | Window sources: cells per `pivot` request while paging. Default 200,000. |
| `locale` | `locale?: string;` | optional, inherited | Locale of the model (number formats in PDF / CSV come from `formattedValue`). |
