API reference: @salmonui/export/pivot
PivotExportOptionsinterface
import type { PivotExportOptions } from '@salmonui/export/pivot';interface PivotExportOptions {
readonly fileName?: string;
readonly rowLayout?: 'compact' | 'tabular';
readonly rowHeaders?: boolean;
readonly rowHeaderCaption?: string;
readonly rowHeaderWidth?: number;
readonly columnWidth?: number;
readonly includeColumn?: (header: PivotExportHeader, index: number) => boolean;
readonly rowRange?: readonly [
number,
number
];
readonly includeRow?: (header: PivotExportHeader, index: number) => boolean;
readonly pivotStyles?: PivotExportStyles;
readonly cell?: (ctx: PivotExportCellContext) => ExportCellOverride | null | undefined | void;
readonly headerCell?: (ctx: PivotExportHeaderContext) => {
readonly text?: string;
readonly style?: ExportCellStyle;
} | null | undefined | void;
readonly windowCells?: number;
readonly locale?: string;
}
Options of every pivot export format.
| Name | Signature | Description |
|---|---|---|
fileNameoptional | readonly fileName?: string; | File name; the extension is added. Default |
rowLayoutoptional | readonly rowLayout?: 'compact' | 'tabular'; |
|
rowHeadersoptional | readonly rowHeaders?: boolean; | Row header columns. Default true. |
rowHeaderCaptionoptional | readonly rowHeaderCaption?: string; | Header text of the row header column(s). Default: the row field captions. |
rowHeaderWidthoptional | readonly rowHeaderWidth?: number; | Column widths in CSS px. Defaults 200 (row headers) and 110. |
columnWidthoptional | readonly columnWidth?: number; | |
includeColumnoptional | readonly includeColumn?: (header: PivotExportHeader, index: number) => boolean; | Exported value columns (hidden columns, current page only). Default every leaf column. |
rowRangeoptional | readonly rowRange?: readonly [
number,
number
]; | Exported leaf row positions |
includeRowoptional | readonly includeRow?: (header: PivotExportHeader, index: number) => boolean; | Exported rows. Default every visible leaf row. |
pivotStylesoptional | readonly pivotStyles?: PivotExportStyles; | Subtotal, grand total and row header styles (merged under conditional formats and the hook). |
celloptional | readonly cell?: (ctx: PivotExportCellContext) => ExportCellOverride | null | undefined | void; | Per body cell. |
headerCelloptional | readonly headerCell?: (ctx: PivotExportHeaderContext) => {
readonly text?: string;
readonly style?: ExportCellStyle;
} | null | undefined | void; | Per header cell. |
windowCellsoptional | readonly windowCells?: number; | Window sources: cells per |
localeoptional | readonly locale?: string; | Locale of the model (number formats in PDF / CSV come from |