# DataGridExportOptions (@salmonui/data-grid)

> The DataGridExportOptions interface of @salmonui/data-grid: Options of every export method.

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

```ts
import type { DataGridExportOptions } 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 DataGridExportOptions<Row> extends ExportOptions<Row>, DataGridExportHooks<Row> {
    readonly download?: boolean;
}
```

Options of every export method.

Members (13):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `download` | `readonly download?: boolean;` | optional | Downloads the file (default true); `false` only resolves it. |
| `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. |
