View as Markdown

API reference: @salmonui/data-grid

DataGridCsvExportOptionsinterface

import type { DataGridCsvExportOptions } from '@salmonui/data-grid';
interface DataGridCsvExportOptions<Row> extends DataGridExportOptions<Row>, CsvOptions {
}
DataGridCsvExportOptions members (22, 22 inherited)
NameSignatureDescription
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.

pagesoptionalinheritedpages?: "all" | "current";

all (default): every page of the current query. current: the current page as shown.

includeHiddenColumnsoptionalinheritedincludeHiddenColumns?: boolean;

Include hidden columns. Default false.

rowsoptionalinheritedrows?: readonly Row[];

Rows to export instead of the grid rows (for example the selected rows), with the grid's columns.

columnsoptionalinheritedcolumns?: readonly ExportColumnOption[];

Export-only columns, in order.

fileNameoptionalinheritedfileName?: string;

Download name; the format extension is added when missing. Default export.

hierarchyoptionalinheritedhierarchy?: "all" | "expanded" | "none";

Detail and child-grid rows: expanded (default), all, or none.

treeoptionalinheritedtree?: "all" | "expanded";

Tree mode rows: expanded (default) exports the visible rows in pre-order; all exports every kept row regardless of expansion (XLSX outlineCollapsed then keeps the collapsed state).

celloptionalinheritedcell?: ((ctx: ExportCellHookContext<Row>) => void | ExportCellPatch | null | undefined);

Per data cell. Not called when unset.

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

Per header cell.

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

Per aggregate cell (grid footer, group footer, group caption).

groupCaptionoptionalinheritedgroupCaption?: ((ctx: ExportGroupCaptionHookContext) => void | string | null | undefined);

Group caption text.

detailoptionalinheriteddetail?: ((ctx: ExportDetailContext<Row>) => void | ExportDetail | null | undefined);

A detail block written after a data row (text lines or a child table), or null for none.

downloadoptionalinheriteddownload?: boolean;

Downloads the file (default true); false only resolves it.