# XlsxExportOptions (@salmonui/export/xlsx)

> The XlsxExportOptions interface of @salmonui/export/xlsx.

Canonical: https://salmonui.dev/docs/reference/export/xlsx/XlsxExportOptions

```ts
import type { XlsxExportOptions } from '@salmonui/export/xlsx';
```

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

## Reference

Kind: interface

```ts
interface XlsxExportOptions<Row> extends ExportOptions<Row>, XlsxOptions {
}
```

Members (22):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `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). |
| `styles` | `styles?: ExportStyles;` | optional, inherited |  |
| `sliceMs` | `sliceMs?: number;` | optional, inherited | Time slice in ms before the writer yields to the event loop. Default 25. |
| `yield` | `yield?: YieldFn;` | optional, inherited | Awaited between slices. Default: a macrotask. |
| `sheetName` | `sheetName?: string;` | optional, inherited | Sheet name of a single-sheet workbook (default `Sheet1`). |
| `sheetNames` | `sheetNames?: readonly string[];` | optional, inherited | Sheet names per grid with `layout: 'sheets'`. |
| `layout` | `layout?: "sheets" \| "stacked";` | optional, inherited | Several grids in one workbook: one sheet each (`sheets`, default) or stacked on one sheet (`stacked`). |
| `gap` | `gap?: number;` | optional, inherited | Empty rows between stacked grids. Default 5. |
| `values` | `values?: "text" \| "typed";` | optional, inherited | `typed` (default): numbers, booleans, and dates as Excel values with number formats. `text`: the display text. |
| `includeHeaders` | `includeHeaders?: boolean;` | optional, inherited | Header rows. Default true. |
| `freezeHeader` | `freezeHeader?: boolean;` | optional, inherited | Freeze the header rows (in addition to pinned columns). Default false. |
| `outlineCollapsed` | `outlineCollapsed?: boolean;` | optional, inherited | Tree mode: with `tree: 'all'`, rows under a parent collapsed in the grid are written hidden and the parent row carries the outline's collapsed flag, so Excel opens with the grid's expansion. Default false (every outline open). |
| `mergeRepeatedValues` | `mergeRepeatedValues?: boolean;` | optional, inherited | Merge repeated values in consecutive data rows. Default false. |
| `compress` | `compress?: boolean;` | optional, inherited | Deflate entries (when the platform has `CompressionStream`). Default true. |
| `header` | `header?: XlsxContent;` | optional, inherited | Rows above the grid, then `gap` empty rows. |
| `footer` | `footer?: XlsxContent;` | optional, inherited | `gap` empty rows, then rows below the grid. |
