@jsfkit/types
    Preparing search index...

    Type Alias PivotTable

    A pivot table definition. Pivot tables dynamically group, filter, and aggregate source data, displaying the results in a structured layout on a worksheet.

    The layout is organized around axes: each PivotField can be placed on the row axis, column axis, or page (filter) axis via its axis property. rowFieldIndices and colFieldIndices list the fields on each axis in display order; each position in that list is sometimes called a level. The page axis fields appear in the page field area, a region above the pivot table body where filter dropdowns are displayed (see pageFields).

    rowItems and colItems describe the rendered layout: each PivotRowColItem represents one row or column header, with itemIndices mapping positionally to the fields on that axis. The data area is the grid of aggregated values framed by those row and column headers; its contents are defined by the dataFields.

    +--------------------------------------------+
    | Page field area (filters) | pageFields
    | rowPageCount × colPageCount |
    +----------------+---------------------------+ firstHeaderRow
    | | Column headers | colItems
    | Row headers +---------------------------+ firstDataRow
    | (rowItems) | Data area |
    | | (dataFields) |
    +----------------+---------------------------+
    ^ firstDataCol

    firstHeaderRow, firstDataRow, and firstDataCol locate these regions within the output range (ref).

    type PivotTable = {
        applyAlignmentFormats?: boolean;
        applyBorderFormats?: boolean;
        applyFontFormats?: boolean;
        applyNumberFormats?: boolean;
        applyPatternFormats?: boolean;
        applyWidthHeightFormats?: boolean;
        autoFormatId?: integer;
        autoRefresh?: boolean;
        cache: PivotCache;
        calculatedFields?: PivotCalculatedField[];
        colFieldIndices?: PivotFieldIndex[];
        colGrandTotals?: boolean;
        colHeaderCaption?: string;
        colItems?: PivotRowColItem[];
        compact?: boolean;
        compactData?: boolean;
        customListSort?: boolean;
        dataCaption?: string;
        dataFields?: PivotDataField[];
        dataOnRows?: boolean;
        dataPosition?: integer;
        enableDrill?: boolean;
        errorCaption?: string;
        fieldPrintTitles?: boolean;
        fields: PivotField[];
        filters?: PivotFilter[];
        grandTotalCaption?: string;
        gridDropZones?: boolean;
        indent?: integer;
        itemPrintTitles?: boolean;
        location: PivotTableLocation;
        mergeItem?: boolean;
        missingCaption?: string;
        multipleFieldFilters?: boolean;
        name: string;
        outline?: boolean;
        outlineData?: boolean;
        pageFields?: PivotPageField[];
        pageOverThenDown?: boolean;
        pageWrap?: integer;
        preserveFormatting?: boolean;
        ref: CellRange;
        rowFieldIndices?: PivotFieldIndex[];
        rowGrandTotals?: boolean;
        rowHeaderCaption?: string;
        rowItems?: PivotRowColItem[];
        sheet: string;
        showCalcMbrs?: boolean;
        showDropZones?: boolean;
        showEmptyCol?: boolean;
        showEmptyRow?: boolean;
        showError?: boolean;
        showHeaders?: boolean;
        showItems?: boolean;
        showMemberPropertyTips?: boolean;
        showMissing?: boolean;
        showMultipleLabel?: boolean;
        style?: PivotTableStyle;
        subtotalHiddenItems?: boolean;
        uid?: string;
        useAutoFormatting?: boolean;
    }
    Index

    Properties

    applyAlignmentFormats?: boolean

    Whether alignment formats from the auto-format are applied.

    false
    
    applyBorderFormats?: boolean

    Whether border formats from the auto-format are applied.

    false
    
    applyFontFormats?: boolean

    Whether font formats from the auto-format are applied.

    false
    
    applyNumberFormats?: boolean

    Whether number formats from the auto-format are applied.

    false
    
    applyPatternFormats?: boolean

    Whether pattern (fill) formats from the auto-format are applied.

    false
    
    applyWidthHeightFormats?: boolean

    Whether width/height adjustments from the auto-format are applied.

    false
    
    autoFormatId?: integer

    Built-in auto-format ID.

    autoRefresh?: boolean

    Whether the pivot table should automatically refresh when its source data changes.

    false
    
    cache: PivotCache

    The pivot cache that supplies source data for this pivot table.

    calculatedFields?: PivotCalculatedField[]

    Calculated field definitions. Each entry defines a formula-based field that derives its values from other cache fields.

    colFieldIndices?: PivotFieldIndex[]

    Fields on the column axis, in display order. Each entry is a PivotFieldIndex: either an index into fields, or -2 for the "Values" virtual field.

    colGrandTotals?: boolean

    Whether grand totals should be shown for columns.

    true
    
    colHeaderCaption?: string

    Caption for the column header area.

    colItems?: PivotRowColItem[]

    Layout items for the column area, describing each column header.

    compact?: boolean

    Default compact flag for pivot fields. Fields inherit this unless they override their own compact.

    true
    
    compactData?: boolean

    Whether data fields in compact layout share a single column.

    true
    
    customListSort?: boolean

    Whether custom list ordering is used when sorting items.

    true
    
    dataCaption?: string

    Caption for the data (values) area. Excel always writes this (typically "Data" or a localized equivalent).

    dataFields?: PivotDataField[]

    The data fields, defining the aggregated values displayed in the pivot table's data area.

    dataOnRows?: boolean

    Whether the data (values) axis runs along rows rather than columns.

    false
    
    dataPosition?: integer

    Position of the "Values" virtual field within its axis. When absent, the Values field is placed at the end.

    enableDrill?: boolean

    Whether drill-down (expand/collapse) is enabled on pivot field items.

    true
    
    errorCaption?: string

    Text to display in place of error values.

    fieldPrintTitles?: boolean

    Whether field names are printed on each page when the pivot table is printed.

    false
    
    fields: PivotField[]

    The pivot fields, paralleling the cache's fields array. Each field's configuration determines whether and how it participates in the pivot table layout.

    filters?: PivotFilter[]

    Advanced filters applied to pivot fields.

    grandTotalCaption?: string

    Custom label for grand total rows/columns.

    gridDropZones?: boolean

    Whether classic-style grid drop zones are shown. Drop zones are labeled regions (e.g. "Drop Row Fields Here") displayed in the pivot table area where fields can be dragged to assign them to an axis.

    false
    
    indent?: integer

    Number of character widths to indent row labels in compact layout.

    1
    
    itemPrintTitles?: boolean

    Whether item labels are printed on each page when the pivot table is printed.

    false
    

    Position information for the pivot table's data within its output range.

    mergeItem?: boolean

    Whether labels from outer row fields are merged across cells.

    false
    
    missingCaption?: string

    Text to display in place of missing values.

    multipleFieldFilters?: boolean

    Whether multiple filters can be applied to a single field simultaneously.

    true
    
    name: string

    The name of the pivot table. Typically unique per workbook, but Excel allows duplicate names across different sheets.

    outline?: boolean

    Default outline flag for pivot fields. Fields inherit this unless they override their own outline.

    false
    
    outlineData?: boolean

    Whether data-area values are repeated on outline header rows. When false (the default), values appear only on the innermost detail rows; when true, each outline-level header row also shows the aggregated values for its group.

    false
    
    pageFields?: PivotPageField[]

    The page (filter) fields, allowing the pivot table to be filtered by specific field values.

    pageOverThenDown?: boolean

    Whether page fields are laid out across then down (true) or down then across (false).

    false
    
    pageWrap?: integer

    Number of page fields per column before wrapping to a new column.

    0
    
    preserveFormatting?: boolean

    Whether cell formatting is preserved on refresh.

    true
    

    The A1-style range reference covering the pivot table's output area.

    rowFieldIndices?: PivotFieldIndex[]

    Fields on the row axis, in display order. Each entry is a PivotFieldIndex: either an index into fields, or -2 for the "Values" virtual field.

    rowGrandTotals?: boolean

    Whether grand totals should be shown for rows.

    true
    
    rowHeaderCaption?: string

    Caption for the row header area.

    rowItems?: PivotRowColItem[]

    Layout items for the row area, describing each row header.

    sheet: string

    The name of the sheet where this pivot table's output is rendered.

    showCalcMbrs?: boolean

    Whether calculated members from OLAP data sources are shown.

    true
    
    showDropZones?: boolean

    Whether drop zones for fields are displayed in the pivot table area.

    true
    
    showEmptyCol?: boolean

    Whether empty columns are shown in the output.

    false
    
    showEmptyRow?: boolean

    Whether empty rows are shown in the output.

    false
    
    showError?: boolean

    Whether error captions are shown (when true, cells with errors display errorCaption).

    false
    
    showHeaders?: boolean

    Whether row and column headers are displayed.

    true
    
    showItems?: boolean

    Whether field items are shown in the pivot table body.

    true
    
    showMemberPropertyTips?: boolean

    Whether member property tooltips are shown.

    true
    
    showMissing?: boolean

    Whether missing-value captions are shown.

    true
    
    showMultipleLabel?: boolean

    Whether the pivot table shows "Multiple Items" labels when a page field has more than one item selected.

    true
    

    Presentation style for the pivot table.

    subtotalHiddenItems?: boolean

    Whether hidden items are included in subtotals.

    false
    
    uid?: string

    Revision-tracking unique identifier. A GUID string like "{93AACE53-8F3A-A04A-893A-A439866B3165}" assigned by Excel 2014+ for revision tracking.

    useAutoFormatting?: boolean

    Whether auto-formatting is applied.

    false