Table of Contents

Class XlsxPivotTable

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

A pivot table on a sheet, as its definition and its cache state it (Phase 213): where it is, what it reads, its fields on rows, columns and filters, its value fields, its layout and style.

public sealed class XlsxPivotTable
Inheritance
XlsxPivotTable
Inherited Members

Remarks

The cells a pivot table covers are ordinary cells of the sheet, holding what Excel last showed; this object describes the table, not those values. A pivot table read and not changed is saved as the bytes it was.

Properties

CalculatedFields

Gets its calculated fields (a formula over the source's fields), whether or not they are shown.

ColumnFields

Gets the fields on its columns, outermost first.

ColumnGrandTotals

Gets whether it shows a grand total for each column (a row of totals at its foot).

DataFields

Gets its value fields, in order.

Filters

Gets its filter fields (Excel's report filters, page fields), in order.

Layout

Gets its report layout.

Location

Gets the range its body covers (Excel's TableRange1: its filter fields, above it, are not in it).

Name

Gets the pivot table's name.

RowFields

Gets the fields on its rows, outermost first.

RowGrandTotals

Gets whether it shows a grand total for each row (a column of totals at its right).

Source

Gets what the pivot table reads: a range of a sheet as Sales!$A$1:$E$25, or a table's or a name's name; null when its source is not a sheet's (an external or OLAP source).

Style

Gets its style's name (as PivotStyleLight16), or null.

Methods

Refresh()

Computes the pivot table from its source again, as Excel's refresh does, and writes the result: its cache (shared items and records), its definition (location, items, row and column entries) and the cells it covers.

ToString()