# DataGridExcelExportOptions (@salmonui/data-grid)

> The DataGridExcelExportOptions interface of @salmonui/data-grid: Excel options: the shared options plus the XlsxOptions of @salmonui/export/xlsx (sheetName, styles, header, footer, freezeHeader, mergeRepeatedValues, layout, gap, ...), passed through.

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

```ts
import type { DataGridExcelExportOptions } 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 DataGridExcelExportOptions<Row> extends DataGridExportOptions<Row> {
    readonly grids?: readonly {
        readonly exportToExcel: unknown;
    }[];
    readonly [option: string]: unknown;
}
```

Excel options: the shared options plus the `XlsxOptions` of
`@salmonui/export/xlsx` (`sheetName`, `styles`, `header`, `footer`,
`freezeHeader`, `mergeRepeatedValues`, `layout`, `gap`, ...), passed through.

Members (14):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `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`. |
| `grids` | `readonly grids?: readonly {     readonly exportToExcel: unknown; }[];` | optional | Further grids written into the same workbook (`layout: 'sheets' \| 'stacked'`). |
| `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. |
| `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. |
