API reference: @salmonui/export/pivot
PivotFileExportOptionsinterface
import type { PivotFileExportOptions } from '@salmonui/export/pivot';interface PivotFileExportOptions extends PivotExportOptions {
readonly format?: PivotExportFormat;
readonly xlsx?: XlsxOptions;
readonly pdf?: PdfOptions;
readonly csv?: CsvOptions;
readonly chart?: ExportImage | readonly ExportImage[];
}
exportPivot() options: the pivot options, the format, and that format's writer options.
| Name | Signature | Description |
|---|---|---|
formatoptional | readonly format?: PivotExportFormat; | Default |
xlsxoptional | readonly xlsx?: XlsxOptions; | XLSX writer options (sheet names, |
pdfoptional | readonly pdf?: PdfOptions; | PDF writer options (page size, orientation, font, page header and footer). |
csvoptional | readonly csv?: CsvOptions; | CSV options (delimiter, BOM; |
chartoptional | readonly chart?: ExportImage | readonly ExportImage[]; | PDF only: chart image(s) (PNG or JPEG bytes with their CSS px size, e.g.
from |
fileNameoptionalinherited | fileName?: string; | File name; the extension is added. Default |
rowLayoutoptionalinherited | rowLayout?: "compact" | "tabular"; |
|
rowHeadersoptionalinherited | rowHeaders?: boolean; | Row header columns. Default true. |
rowHeaderCaptionoptionalinherited | rowHeaderCaption?: string; | Header text of the row header column(s). Default: the row field captions. |
rowHeaderWidthoptionalinherited | rowHeaderWidth?: number; | Column widths in CSS px. Defaults 200 (row headers) and 110. |
columnWidthoptionalinherited | columnWidth?: number; | |
includeColumnoptionalinherited | includeColumn?: ((header: PivotExportHeader, index: number) => boolean); | Exported value columns (hidden columns, current page only). Default every leaf column. |
rowRangeoptionalinherited | rowRange?: readonly [number, number]; | Exported leaf row positions |
includeRowoptionalinherited | includeRow?: ((header: PivotExportHeader, index: number) => boolean); | Exported rows. Default every visible leaf row. |
pivotStylesoptionalinherited | pivotStyles?: PivotExportStyles; | Subtotal, grand total and row header styles (merged under conditional formats and the hook). |
celloptionalinherited | cell?: ((ctx: PivotExportCellContext) => void | ExportCellOverride | null | undefined); | Per body cell. |
headerCelloptionalinherited | headerCell?: ((ctx: PivotExportHeaderContext) => void | { readonly text?: string; readonly style?: ExportCellStyle; } | null | undefined); | Per header cell. |
windowCellsoptionalinherited | windowCells?: number; | Window sources: cells per |
localeoptionalinherited | locale?: string; | Locale of the model (number formats in PDF / CSV come from |