# openpyxl.pivot.cache module

class openpyxl.pivot.cache.CacheDefinition(invalid=None, saveData=None, refreshOnLoad=None, optimizeMemory=None, enableRefresh=None, refreshedBy=None, refreshedDate=None, refreshedDateIso=None, backgroundQuery=None, missingItemsLimit=None, createdVersion=None, refreshedVersion=None, minRefreshableVersion=None, recordCount=None, upgradeOnRefresh=None, tupleCache=None, supportSubquery=None, supportAdvancedDrill=None, cacheSource=None, cacheFields=(), cacheHierarchies=(), kpis=(), calculatedItems=(), calculatedMembers=(), dimensions=(), measureGroups=(), maps=(), extLst=None, id=None)

  Bases: `Serialisable`

  backgroundQuery

    Values must be of type <class ‘bool’>

  cacheFields

    Wrap a sequence in an containing object

  cacheHierarchies

    Wrap a sequence in an containing object

  cacheSource

    Values must be of type <class ‘openpyxl.pivot.cache.CacheSource’>

  calculatedItems

    Wrap a sequence in an containing object

  calculatedMembers

    Wrap a sequence in an containing object

  createdVersion

    Values must be of type <class ‘int’>

  dimensions

    Wrap a sequence in an containing object

  enableRefresh

    Values must be of type <class ‘bool’>

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  id

    Values must be of type <class ‘str’>

  invalid

    Values must be of type <class ‘bool’>

  kpis

    Wrap a sequence in an containing object

  maps

    Wrap a sequence in an containing object

  measureGroups

    Wrap a sequence in an containing object

  mime_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml'
  minRefreshableVersion

    Values must be of type <class ‘int’>

  missingItemsLimit

    Values must be of type <class ‘int’>

  optimizeMemory

    Values must be of type <class ‘bool’>

  property path
  recordCount

    Values must be of type <class ‘int’>

  records = None
  refreshOnLoad

    Values must be of type <class ‘bool’>

  refreshedBy

    Values must be of type <class ‘str’>

  refreshedDate

    Values must be of type <class ‘float’>

  refreshedDateIso

    Values must be of type <class ‘datetime.datetime’>

  refreshedVersion

    Values must be of type <class ‘int’>

  rel_type = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition'
  saveData

    Values must be of type <class ‘bool’>

  supportAdvancedDrill

    Values must be of type <class ‘bool’>

  supportSubquery

    Values must be of type <class ‘bool’>

  tagname = 'pivotCacheDefinition'
  to_tree()
  tupleCache

    Values must be of type <class ‘openpyxl.pivot.cache.TupleCache’>

  upgradeOnRefresh

    Values must be of type <class ‘bool’>

class openpyxl.pivot.cache.CacheField(sharedItems=None, fieldGroup=None, mpMap=None, extLst=None, name=None, caption=None, propertyName=None, serverField=None, uniqueList=True, numFmtId=None, formula=None, sqlType=0, hierarchy=0, level=0, databaseField=True, mappingCount=None, memberPropertyField=None)

  Bases: `Serialisable`

  caption

    Values must be of type <class ‘str’>

  databaseField

    Values must be of type <class ‘bool’>

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  fieldGroup

    Values must be of type <class ‘openpyxl.pivot.cache.FieldGroup’>

  formula

    Values must be of type <class ‘str’>

  hierarchy

    Values must be of type <class ‘int’>

  level

    Values must be of type <class ‘int’>

  mappingCount

    Values must be of type <class ‘int’>

  memberPropertyField

    Values must be of type <class ‘bool’>

  mpMap

    Values must be of type <class ‘int’>

  name

    Values must be of type <class ‘str’>

  numFmtId

    Values must be of type <class ‘int’>

  propertyName

    Values must be of type <class ‘str’>

  serverField

    Values must be of type <class ‘bool’>

  sharedItems

    Values must be of type <class ‘openpyxl.pivot.cache.SharedItems’>

  sqlType

    Values must be of type <class ‘int’>

  tagname = 'cacheField'
  uniqueList

    Values must be of type <class ‘bool’>

class openpyxl.pivot.cache.CacheHierarchy(uniqueName='', caption=None, measure=None, set=None, parentSet=None, iconSet=0, attribute=None, time=None, keyAttribute=None, defaultMemberUniqueName=None, allUniqueName=None, allCaption=None, dimensionUniqueName=None, displayFolder=None, measureGroup=None, measures=None, count=None, oneField=None, memberValueDatatype=None, unbalanced=None, unbalancedGroup=None, hidden=None, fieldsUsage=(), groupLevels=(), extLst=None)

  Bases: `Serialisable`

  allCaption

    Values must be of type <class ‘str’>

  allUniqueName

    Values must be of type <class ‘str’>

  attribute

    Values must be of type <class ‘bool’>

  caption

    Values must be of type <class ‘str’>

  count

    Values must be of type <class ‘int’>

  defaultMemberUniqueName

    Values must be of type <class ‘str’>

  dimensionUniqueName

    Values must be of type <class ‘str’>

  displayFolder

    Values must be of type <class ‘str’>

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  fieldsUsage

    Wrap a sequence in an containing object

  groupLevels

    Wrap a sequence in an containing object

  hidden

    Values must be of type <class ‘bool’>

  iconSet

    Values must be of type <class ‘int’>

  keyAttribute

    Values must be of type <class ‘bool’>

  measure

    Values must be of type <class ‘bool’>

  measureGroup

    Values must be of type <class ‘str’>

  measures

    Values must be of type <class ‘bool’>

  memberValueDatatype

    Values must be of type <class ‘int’>

  oneField

    Values must be of type <class ‘bool’>

  parentSet

    Values must be of type <class ‘int’>

  set

    Values must be of type <class ‘bool’>

  tagname = 'cacheHierarchy'
  time

    Values must be of type <class ‘bool’>

  unbalanced

    Values must be of type <class ‘bool’>

  unbalancedGroup

    Values must be of type <class ‘bool’>

  uniqueName

    Values must be of type <class ‘str’>

class openpyxl.pivot.cache.CacheSource(type=None, connectionId=None, worksheetSource=None, consolidation=None, extLst=None)

  Bases: `Serialisable`

  connectionId

    Values must be of type <class ‘int’>

  consolidation

    Values must be of type <class ‘openpyxl.pivot.cache.Consolidation’>

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  tagname = 'cacheSource'
  type

    Value must be one of [‘consolidation’, ‘external’, ‘scenario’, ‘worksheet’]

  worksheetSource

    Values must be of type <class ‘openpyxl.pivot.cache.WorksheetSource’>

class openpyxl.pivot.cache.CalculatedItem(field=None, formula=None, pivotArea=None, extLst=None)

  Bases: `Serialisable`

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  field

    Values must be of type <class ‘int’>

  formula

    Values must be of type <class ‘str’>

  pivotArea

    Values must be of type <class ‘openpyxl.pivot.table.PivotArea’>

  tagname = 'calculatedItem'

class openpyxl.pivot.cache.CalculatedMember(name=None, mdx=None, memberName=None, hierarchy=None, parent=None, solveOrder=None, set=None, extLst=None)

  Bases: `Serialisable`

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  hierarchy

    Values must be of type <class ‘str’>

  mdx

    Values must be of type <class ‘str’>

  memberName

    Values must be of type <class ‘str’>

  name

    Values must be of type <class ‘str’>

  parent

    Values must be of type <class ‘str’>

  set

    Values must be of type <class ‘bool’>

  solveOrder

    Values must be of type <class ‘int’>

  tagname = 'calculatedMember'

class openpyxl.pivot.cache.Consolidation(autoPage=None, pages=(), rangeSets=())

  Bases: `Serialisable`

  autoPage

    Values must be of type <class ‘bool’>

  pages

    Wrap a sequence in an containing object

  rangeSets

    Wrap a sequence in an containing object

  tagname = 'consolidation'

class openpyxl.pivot.cache.FieldGroup(par=None, base=None, rangePr=None, discretePr=(), groupItems=None)

  Bases: `Serialisable`

  base

    Values must be of type <class ‘int’>

  discretePr

    Wrap a sequence in an containing object

  groupItems

    Values must be of type <class ‘openpyxl.pivot.cache.GroupItems’>

  par

    Values must be of type <class ‘int’>

  rangePr

    Values must be of type <class ‘openpyxl.pivot.cache.RangePr’>

  tagname = 'fieldGroup'

class openpyxl.pivot.cache.FieldUsage(x=None)

  Bases: `Serialisable`

  tagname = 'fieldUsage'
  x

    Values must be of type <class ‘int’>

class openpyxl.pivot.cache.GroupItems(count=None, m=(), n=(), b=(), e=(), s=(), d=())

  Bases: `Serialisable`

  b

    A sequence (list or tuple) that may only contain objects of the declared type

  property count
  d

    A sequence (list or tuple) that may only contain objects of the declared type

  e

    A sequence (list or tuple) that may only contain objects of the declared type

  m

    A sequence (list or tuple) that may only contain objects of the declared type

  n

    A sequence (list or tuple) that may only contain objects of the declared type

  s

    A sequence (list or tuple) that may only contain objects of the declared type

  tagname = 'groupItems'

class openpyxl.pivot.cache.GroupLevel(uniqueName=None, caption=None, user=None, customRollUp=None, groups=(), extLst=None)

  Bases: `Serialisable`

  caption

    Values must be of type <class ‘str’>

  customRollUp

    Values must be of type <class ‘bool’>

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  groups

    Wrap a sequence in an containing object

  tagname = 'groupLevel'
  uniqueName

    Values must be of type <class ‘str’>

  user

    Values must be of type <class ‘bool’>

class openpyxl.pivot.cache.GroupMember(uniqueName=None, group=None)

  Bases: `Serialisable`

  group

    Values must be of type <class ‘bool’>

  tagname = 'groupMember'
  uniqueName

    Values must be of type <class ‘str’>

class openpyxl.pivot.cache.LevelGroup(name=None, uniqueName=None, caption=None, uniqueParent=None, id=None, groupMembers=())

  Bases: `Serialisable`

  caption

    Values must be of type <class ‘str’>

  groupMembers

    Wrap a sequence in an containing object

  id

    Values must be of type <class ‘int’>

  name

    Values must be of type <class ‘str’>

  tagname = 'group'
  uniqueName

    Values must be of type <class ‘str’>

  uniqueParent

    Values must be of type <class ‘str’>

class openpyxl.pivot.cache.MeasureDimensionMap(measureGroup=None, dimension=None)

  Bases: `Serialisable`

  dimension

    Values must be of type <class ‘int’>

  measureGroup

    Values must be of type <class ‘int’>

  tagname = 'map'

class openpyxl.pivot.cache.MeasureGroup(name=None, caption=None)

  Bases: `Serialisable`

  caption

    Values must be of type <class ‘str’>

  name

    Values must be of type <class ‘str’>

  tagname = 'measureGroup'

class openpyxl.pivot.cache.OLAPKPI(uniqueName=None, caption=None, displayFolder=None, measureGroup=None, parent=None, value=None, goal=None, status=None, trend=None, weight=None, time=None)

  Bases: `Serialisable`

  caption

    Values must be of type <class ‘str’>

  displayFolder

    Values must be of type <class ‘str’>

  goal

    Values must be of type <class ‘str’>

  measureGroup

    Values must be of type <class ‘str’>

  parent

    Values must be of type <class ‘str’>

  status

    Values must be of type <class ‘str’>

  tagname = 'kpi'
  time

    Values must be of type <class ‘str’>

  trend

    Values must be of type <class ‘str’>

  uniqueName

    Values must be of type <class ‘str’>

  value

    Values must be of type <class ‘str’>

  weight

    Values must be of type <class ‘str’>

class openpyxl.pivot.cache.OLAPSet(count=None, maxRank=None, setDefinition=None, sortType=None, queryFailed=None, tpls=None, sortByTuple=None)

  Bases: `Serialisable`

  count

    Values must be of type <class ‘int’>

  maxRank

    Values must be of type <class ‘int’>

  queryFailed

    Values must be of type <class ‘bool’>

  setDefinition

    Values must be of type <class ‘str’>

  sortByTuple

    Values must be of type <class ‘openpyxl.pivot.fields.TupleList’>

  sortType

    Value must be one of [‘ascending’, ‘ascendingAlpha’, ‘ascendingNatural’, ‘descending’, ‘descendingAlpha’, ‘descendingNatural’]

  tagname = 'set'
  tpls

    Values must be of type <class ‘openpyxl.pivot.fields.TupleList’>

class openpyxl.pivot.cache.PCDSDTCEntries(count=None, m=None, n=None, e=None, s=None)

  Bases: `Serialisable`

  count

    Values must be of type <class ‘int’>

  e

    Values must be of type <class ‘openpyxl.pivot.fields.Error’>

  m

    Values must be of type <class ‘openpyxl.pivot.fields.Missing’>

  n

    Values must be of type <class ‘openpyxl.pivot.fields.Number’>

  s

    Values must be of type <class ‘openpyxl.pivot.fields.Text’>

  tagname = 'entries'

class openpyxl.pivot.cache.PageItem(name=None)

  Bases: `Serialisable`

  name

    Values must be of type <class ‘str’>

  tagname = 'pageItem'

class openpyxl.pivot.cache.PivotDimension(measure=None, name=None, uniqueName=None, caption=None)

  Bases: `Serialisable`

  caption

    Values must be of type <class ‘str’>

  measure

    Values must be of type <class ‘bool’>

  name

    Values must be of type <class ‘str’>

  tagname = 'dimension'
  uniqueName

    Values must be of type <class ‘str’>

class openpyxl.pivot.cache.Query(mdx=None, tpls=None)

  Bases: `Serialisable`

  mdx

    Values must be of type <class ‘str’>

  tagname = 'query'
  tpls

    Values must be of type <class ‘openpyxl.pivot.fields.TupleList’>

class openpyxl.pivot.cache.RangePr(autoStart=True, autoEnd=True, groupBy='range', startNum=None, endNum=None, startDate=None, endDate=None, groupInterval=1)

  Bases: `Serialisable`

  autoEnd

    Values must be of type <class ‘bool’>

  autoStart

    Values must be of type <class ‘bool’>

  endDate

    Values must be of type <class ‘datetime.datetime’>

  endNum

    Values must be of type <class ‘float’>

  groupBy

    Value must be one of [‘days’, ‘hours’, ‘minutes’, ‘months’, ‘quarters’, ‘range’, ‘seconds’, ‘years’]

  groupInterval

    Values must be of type <class ‘float’>

  startDate

    Values must be of type <class ‘datetime.datetime’>

  startNum

    Values must be of type <class ‘float’>

  tagname = 'rangePr'

class openpyxl.pivot.cache.RangeSet(i1=None, i2=None, i3=None, i4=None, ref=None, name=None, sheet=None)

  Bases: `Serialisable`

  i1

    Values must be of type <class ‘int’>

  i2

    Values must be of type <class ‘int’>

  i3

    Values must be of type <class ‘int’>

  i4

    Values must be of type <class ‘int’>

  name

    Values must be of type <class ‘str’>

  ref

    Values must be of type <class ‘str’>

  sheet

    Values must be of type <class ‘str’>

  tagname = 'rangeSet'

class openpyxl.pivot.cache.ServerFormat(culture=None, format=None)

  Bases: `Serialisable`

  culture

    Values must be of type <class ‘str’>

  format

    Values must be of type <class ‘str’>

  tagname = 'serverFormat'

class openpyxl.pivot.cache.SharedItems(_fields=(), containsSemiMixedTypes=None, containsNonDate=None, containsDate=None, containsString=None, containsBlank=None, containsMixedTypes=None, containsNumber=None, containsInteger=None, minValue=None, maxValue=None, minDate=None, maxDate=None, count=None, longText=None)

  Bases: `Serialisable`

  b

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  containsBlank

    Values must be of type <class ‘bool’>

  containsDate

    Values must be of type <class ‘bool’>

  containsInteger

    Values must be of type <class ‘bool’>

  containsMixedTypes

    Values must be of type <class ‘bool’>

  containsNonDate

    Values must be of type <class ‘bool’>

  containsNumber

    Values must be of type <class ‘bool’>

  containsSemiMixedTypes

    Values must be of type <class ‘bool’>

  containsString

    Values must be of type <class ‘bool’>

  property count
  d

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  e

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  longText

    Values must be of type <class ‘bool’>

  m

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  maxDate

    Values must be of type <class ‘datetime.datetime’>

  maxValue

    Values must be of type <class ‘float’>

  minDate

    Values must be of type <class ‘datetime.datetime’>

  minValue

    Values must be of type <class ‘float’>

  n

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  s

    Allow a multisequence to be built up from parts

    Excluded from the instance __elements__ or __attrs__ as is effectively an Alias

  tagname = 'sharedItems'

class openpyxl.pivot.cache.TupleCache(entries=None, sets=(), queryCache=(), serverFormats=(), extLst=None)

  Bases: `Serialisable`

  entries

    Values must be of type <class ‘openpyxl.pivot.cache.PCDSDTCEntries’>

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  queryCache

    Wrap a sequence in an containing object

  serverFormats

    Wrap a sequence in an containing object

  sets

    Wrap a sequence in an containing object

  tagname = 'tupleCache'

class openpyxl.pivot.cache.WorksheetSource(ref=None, name=None, sheet=None)

  Bases: `Serialisable`

  name

    Values must be of type <class ‘str’>

  ref

    Values must be of type <class ‘str’>

  sheet

    Values must be of type <class ‘str’>

  tagname = 'worksheetSource'