modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Interface PivotDataFieldOptions

    Options for adding a data (values) field via the builder.

    interface PivotDataFieldOptions {
        fieldIndex: number;
        name?: string;
        numFmtId?: number;
        subtotal?: SubtotalFunction;
    }
    Index
    fieldIndex: number

    Source field index (0-based).

    name?: string

    Caption of the data field (e.g. "Sum of Revenue"). Written on the data field only, never on the pivot field.

    numFmtId?: number

    Number format ID.

    subtotal?: SubtotalFunction

    Aggregation function (default 'sum').