openpyxl.pivot.record module

class openpyxl.pivot.record.Record(_fields=(), m=None, n=None, b=None, e=None, s=None, d=None, x=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

b

Allow a multisequence to be built up from parts

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

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

m

Allow a multisequence to be built up from parts

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

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 = 'r'
x

Allow a multisequence to be built up from parts

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

class openpyxl.pivot.record.RecordList(count=None, r=(), extLst=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

count
extLst

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

mime_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml'
path
r

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

rel_type = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords'
tagname = 'pivotCacheRecords'
to_tree()[源代码]
openpyxl.pivot.record.tostring(element, *, encoding='utf-8', method=None, short_empty_elements=True)

Generate string representation of XML element.

All subelements are included. If encoding is “unicode”, a string is returned. Otherwise a bytestring is returned.

element is an Element instance, encoding is an optional output encoding defaulting to US-ASCII, method is an optional output which can be one of “xml” (default), “html”, “text” or “c14n”.

Returns an (optionally) encoded string containing the XML data.