API reference: @salmonui/data-grid
DataGridExcelExportOptionsinterface
import type { DataGridExcelExportOptions } from '@salmonui/data-grid';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.
| Name | Signature | Description |
|---|---|---|
rowsoptionalinherited | rows?: readonly Row[]; | Rows to export instead of the grid rows (for example the selected rows), with the grid's columns. |
columnsoptionalinherited | columns?: readonly ExportColumnOption[]; | Export-only columns, in order. |
fileNameoptionalinherited | fileName?: string; | Download name; the format extension is added when missing. Default |
gridsoptional | readonly grids?: readonly {
readonly exportToExcel: unknown;
}[]; | Further grids written into the same workbook ( |
pagesoptionalinherited | pages?: "all" | "current"; |
|
includeHiddenColumnsoptionalinherited | includeHiddenColumns?: boolean; | Include hidden columns. Default false. |
hierarchyoptionalinherited | hierarchy?: "all" | "expanded" | "none"; | Detail and child-grid rows: |
treeoptionalinherited | tree?: "all" | "expanded"; | Tree mode rows: |
celloptionalinherited | cell?: ((ctx: ExportCellHookContext<Row>) => void | ExportCellPatch | null | undefined); | Per data cell. Not called when unset. |
headerCelloptionalinherited | headerCell?: ((ctx: ExportHeaderCellHookContext<Row>) => void | { readonly text?: string; readonly style?: ExportCellStyle; } | null | undefined); | Per header cell. |
aggregateCelloptionalinherited | aggregateCell?: ((ctx: ExportAggregateCellHookContext) => void | { readonly text?: string; readonly style?: ExportCellStyle; } | null | undefined); | Per aggregate cell (grid footer, group footer, group caption). |
groupCaptionoptionalinherited | groupCaption?: ((ctx: ExportGroupCaptionHookContext) => void | string | null | undefined); | Group caption text. |
detailoptionalinherited | detail?: ((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. |
downloadoptionalinherited | download?: boolean; | Downloads the file (default true); |