View as Markdown

API reference: @salmonui/data-grid/engine/export

CsvStreamOptionsinterface

import type { CsvStreamOptions } from '@salmonui/data-grid/engine/export';
interface CsvStreamOptions extends CsvOptions {
    readonly chunkRows?: number;
    readonly sliceMs?: number;
    readonly yield?: () => Promise<void>;
}
CsvStreamOptions members (12, 9 inherited)
NameSignatureDescription
chunkRowsoptionalreadonly chunkRows?: number;

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

sliceMsoptionalreadonly sliceMs?: number;

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

yieldoptionalreadonly yield?: () => Promise<void>;

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

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.