apex-grid
    Preparing search index...

    Interface CSVExportOptions<T>

    Options for ApexGrid.exportToCSV.

    interface CSVExportOptions<T extends object> {
        bom?: boolean;
        columns?: readonly (keyof T)[];
        delimiter?: string;
        filename?: string;
        formatter?: (
            column: ColumnConfiguration<T>,
            value: unknown,
            row: T,
        ) => ExportCellValue;
        includeHeader?: boolean;
        newline?: string;
        source?: ExportSource;
    }

    Type Parameters

    • T extends object

    Hierarchy (View Summary)

    Index

    Properties

    bom?: boolean

    Prepend a UTF-8 byte-order mark so Excel auto-detects the encoding when opening the file. Defaults to true.

    columns?: readonly (keyof T)[]

    Column keys to include. When omitted, every visible non-hidden column with exportable !== false is exported, in display order.

    delimiter?: string

    Field delimiter. Defaults to ','.

    filename?: string

    Output filename, without extension. Defaults to 'data'.

    formatter?: (
        column: ColumnConfiguration<T>,
        value: unknown,
        row: T,
    ) => ExportCellValue

    Per-cell value formatter. Receives the column configuration, the raw value from the record, and the record itself. Return one of ExportCellValue (return a Date to keep date typing in XLSX).

    includeHeader?: boolean

    Whether to emit a header row. Defaults to true.

    newline?: string

    Line separator. Defaults to '\r\n' (RFC 4180).

    source?: ExportSource

    Row set to export. Defaults to 'view'.