# DataGridCsvExportOptions (@salmonui/data-grid)

> The DataGridCsvExportOptions interface of @salmonui/data-grid.

Canonical: https://salmonui.dev/docs/reference/data-grid/DataGridCsvExportOptions

```ts
import type { DataGridCsvExportOptions } from '@salmonui/data-grid';
```

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

## Reference

Kind: interface

```ts
interface DataGridCsvExportOptions<Row> extends DataGridExportOptions<Row>, CsvOptions {
}
```

Members (22):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `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. |
| `pages` | `pages?: "all" \| "current";` | optional, inherited | `all` (default): every page of the current query. `current`: the current page as shown. |
| `includeHiddenColumns` | `includeHiddenColumns?: boolean;` | optional, inherited | Include hidden columns. Default false. |
| `rows` | `rows?: readonly Row[];` | optional, inherited | Rows to export instead of the grid rows (for example the selected rows), with the grid's columns. |
| `columns` | `columns?: readonly ExportColumnOption[];` | optional, inherited | Export-only columns, in order. |
| `fileName` | `fileName?: string;` | optional, inherited | Download name; the format extension is added when missing. Default `export`. |
| `hierarchy` | `hierarchy?: "all" \| "expanded" \| "none";` | optional, inherited | Detail and child-grid rows: `expanded` (default), `all`, or `none`. |
| `tree` | `tree?: "all" \| "expanded";` | optional, inherited | 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). |
| `cell` | `cell?: ((ctx: ExportCellHookContext<Row>) => void \| ExportCellPatch \| null \| undefined);` | optional, inherited | Per data cell. Not called when unset. |
| `headerCell` | `headerCell?: ((ctx: ExportHeaderCellHookContext<Row>) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per header cell. |
| `aggregateCell` | `aggregateCell?: ((ctx: ExportAggregateCellHookContext) => void \| { readonly text?: string; readonly style?: ExportCellStyle; } \| null \| undefined);` | optional, inherited | Per aggregate cell (grid footer, group footer, group caption). |
| `groupCaption` | `groupCaption?: ((ctx: ExportGroupCaptionHookContext) => void \| string \| null \| undefined);` | optional, inherited | Group caption text. |
| `detail` | `detail?: ((ctx: ExportDetailContext<Row>) => void \| ExportDetail \| null \| undefined);` | optional, inherited | A detail block written after a data row (text lines or a child table), or null for none. |
| `download` | `download?: boolean;` | optional, inherited | Downloads the file (default true); `false` only resolves it. |
