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

    Interface PivotFieldOptions

    Options for adding a row, column, or page field via the builder.

    interface PivotFieldOptions {
        compact?: boolean;
        fieldIndex: number;
        name?: string;
        outline?: boolean;
        subtotals?: SubtotalFunction[];
    }
    Index
    compact?: boolean

    Compact layout (default true).

    fieldIndex: number

    Source field index (0-based, position in the source data columns).

    name?: string

    Display name override.

    outline?: boolean

    Outline layout (default true).

    subtotals?: SubtotalFunction[]

    Subtotal functions, written as the field's *Subtotal flags. Empty (the default) writes no flag, so Excel shows its automatic subtotal.