View as Markdown

API reference: @salmonui/pivot-table

PivotExportOptionsinterface

import type { PivotExportOptions } from '@salmonui/pivot-table';
interface PivotExportOptions {
    readonly fileName?: string | undefined;
    readonly download?: boolean | undefined;
    readonly chart?: ExportImage | readonly ExportImage[] | undefined;
    readonly escapeFormulas?: boolean | undefined;
    readonly [option: string]: unknown;
}

Options of api.exportToExcel() / exportToCsv() / exportToPdf(), passed through to exportPivot() (file name, row layout, styles, cell hook, ...).

PivotExportOptions members (4)
NameSignatureDescription
fileNameoptionalreadonly fileName?: string | undefined;

File name without extension. Default pivot.

downloadoptionalreadonly download?: boolean | undefined;

Return the file instead of downloading it (the promise still resolves after the write).

chartoptionalreadonly chart?: ExportImage | readonly ExportImage[] | undefined;

PDF only: chart image(s) on their own pages after the table (pivotChartImage(chartApi)).

escapeFormulasoptionalreadonly escapeFormulas?: boolean | undefined;

CSV only: neutralize spreadsheet formulas in text cells. Default true; false writes raw text.