Skip to content

excel pivottable get

zmworm edited this page Apr 8, 2026 · 56 revisions

Excel: Pivot Table - get

Get pivot table properties and field configuration.

Path: /{SheetName}/pivottable[N]

Attributes

Attribute Type Description
name string Pivot table name
cacheId number Cache definition ID
location string Cell range where the pivot table is placed
fieldCount number Total number of fields
rows string Comma-separated list of row field names
cols string Comma-separated list of column field names
filters string Comma-separated list of filter field names
dataFieldCount number Number of data (value) fields
dataField1..dataFieldN string Data field info, format: name:func:fieldIdx (e.g. Sum of Sales:sum:2)
dataField{N}.showAs string Optional showAs token (e.g. percent_of_row)
style string Applied pivot table style name

Examples

# Get pivot table properties
officecli get data.xlsx /Sheet1/pivottable[1]
/Sheet1/pivottable[1]
  name: SalesPivot
  cacheId: 1
  location: H1:K15
  fieldCount: 5
  rows: Region,Category
  cols: Year
  filters: Status
  dataFieldCount: 2
  dataField1: Sum of Sales:sum:3
  dataField2: Count of Qty:count:4
  style: PivotStyleMedium9
# Get as JSON
officecli get data.xlsx /Sheet1/pivottable[1] --json

See Also


Based on OfficeCLI v1.0.38

Clone this wiki locally