View as Markdown

API reference: @salmonui/export/xlsx

XlsxExportOptionsinterface

import type { XlsxExportOptions } from '@salmonui/export/xlsx';
interface XlsxExportOptions<Row> extends ExportOptions<Row>, XlsxOptions {
}
XlsxExportOptions members (22, 22 inherited)
NameSignatureDescription
pagesoptionalinheritedpages?: "all" | "current";

all (default): every page of the current query. current: the current page as shown.

includeHiddenColumnsoptionalinheritedincludeHiddenColumns?: boolean;

Include hidden columns. Default false.

rowsoptionalinheritedrows?: readonly Row[];

Rows to export instead of the grid rows (for example the selected rows), with the grid's columns.

columnsoptionalinheritedcolumns?: readonly ExportColumnOption[];

Export-only columns, in order.

fileNameoptionalinheritedfileName?: string;

Download name; the format extension is added when missing. Default export.

hierarchyoptionalinheritedhierarchy?: "all" | "expanded" | "none";

Detail and child-grid rows: expanded (default), all, or none.

treeoptionalinheritedtree?: "all" | "expanded";

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).

stylesoptionalinheritedstyles?: ExportStyles;
sliceMsoptionalinheritedsliceMs?: number;

Time slice in ms before the writer yields to the event loop. Default 25.

yieldoptionalinheritedyield?: YieldFn;

Awaited between slices. Default: a macrotask.

sheetNameoptionalinheritedsheetName?: string;

Sheet name of a single-sheet workbook (default Sheet1).

sheetNamesoptionalinheritedsheetNames?: readonly string[];

Sheet names per grid with layout: 'sheets'.

layoutoptionalinheritedlayout?: "sheets" | "stacked";

Several grids in one workbook: one sheet each (sheets, default) or stacked on one sheet (stacked).

gapoptionalinheritedgap?: number;

Empty rows between stacked grids. Default 5.

valuesoptionalinheritedvalues?: "text" | "typed";

typed (default): numbers, booleans, and dates as Excel values with number formats. text: the display text.

includeHeadersoptionalinheritedincludeHeaders?: boolean;

Header rows. Default true.

freezeHeaderoptionalinheritedfreezeHeader?: boolean;

Freeze the header rows (in addition to pinned columns). Default false.

outlineCollapsedoptionalinheritedoutlineCollapsed?: boolean;

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).

mergeRepeatedValuesoptionalinheritedmergeRepeatedValues?: boolean;

Merge repeated values in consecutive data rows. Default false.

compressoptionalinheritedcompress?: boolean;

Deflate entries (when the platform has CompressionStream). Default true.

headeroptionalinheritedheader?: XlsxContent;

Rows above the grid, then gap empty rows.

footeroptionalinheritedfooter?: XlsxContent;

gap empty rows, then rows below the grid.