View as Markdown

API reference: @salmonui/export/pivot

PivotCsvStreamOptionsinterface

import type { PivotCsvStreamOptions } from '@salmonui/export/pivot';
interface PivotCsvStreamOptions extends PivotExportOptions, CsvStreamOptions {
    readonly signal?: unknown;
}
PivotCsvStreamOptions members (27, 26 inherited)
NameSignatureDescription
signaloptionalreadonly signal?: unknown;
delimiteroptionalinheriteddelimiter?: string;

Default ,.

lineBreakoptionalinheritedlineBreak?: string;

Default \r\n (RFC 4180).

includeHeadersoptionalinheritedincludeHeaders?: boolean;

Header line with the leaf header texts. Default true.

valuesoptionalinheritedvalues?: "formatted" | "raw";

formatted (default): the column display text. raw: numbers and booleans as is, dates as ISO 8601.

aggregateRowsoptionalinheritedaggregateRows?: boolean;

Group caption, group footer, and grid footer aggregate lines. Default true.

bomoptionalinheritedbom?: boolean;

Prefix a UTF-8 byte order mark (Excel detects UTF-8). Default false.

quoteAlloptionalinheritedquoteAll?: boolean;

Quote every field instead of only those that need it. Default false.

escapeFormulasoptionalinheritedescapeFormulas?: boolean;

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.

treeDepthColumnoptionalinheritedtreeDepthColumn?: string | boolean;

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.

chunkRowsoptionalinheritedchunkRows?: number;

Upper bound of rows per chunk. Default 5,000.

sliceMsoptionalinheritedsliceMs?: number;

Time slice per chunk in ms; a chunk ends early when it runs longer. Default 25.

yieldoptionalinheritedyield?: (() => Promise<void>);

Awaited between chunks. Default: a macrotask (setTimeout(0)) when available, else a resolved promise.

fileNameoptionalinheritedfileName?: string;

File name; the extension is added. Default export.

rowLayoutoptionalinheritedrowLayout?: "compact" | "tabular";

compact (default): one indented row header column; tabular: one column per row level.

rowHeadersoptionalinheritedrowHeaders?: boolean;

Row header columns. Default true.

rowHeaderCaptionoptionalinheritedrowHeaderCaption?: string;

Header text of the row header column(s). Default: the row field captions.

rowHeaderWidthoptionalinheritedrowHeaderWidth?: number;

Column widths in CSS px. Defaults 200 (row headers) and 110.

columnWidthoptionalinheritedcolumnWidth?: number;
includeColumnoptionalinheritedincludeColumn?: ((header: PivotExportHeader, index: number) => boolean);

Exported value columns (hidden columns, current page only). Default every leaf column.

rowRangeoptionalinheritedrowRange?: readonly [number, number];

Exported leaf row positions [start, end) (current page only). Default every row.

includeRowoptionalinheritedincludeRow?: ((header: PivotExportHeader, index: number) => boolean);

Exported rows. Default every visible leaf row.

pivotStylesoptionalinheritedpivotStyles?: PivotExportStyles;

Subtotal, grand total and row header styles (merged under conditional formats and the hook).

celloptionalinheritedcell?: ((ctx: PivotExportCellContext) => void | ExportCellOverride | null | undefined);

Per body cell.

headerCelloptionalinheritedheaderCell?: ((ctx: PivotExportHeaderContext) => void | { readonly text?: string; readonly style?: ExportCellStyle; } | null | undefined);

Per header cell.

windowCellsoptionalinheritedwindowCells?: number;

Window sources: cells per pivot request while paging. Default 200,000.

localeoptionalinheritedlocale?: string;

Locale of the model (number formats in PDF / CSV come from formattedValue).