openpyxl.worksheet.table module

class openpyxl.worksheet.table.Table(id=1, displayName=None, ref=None, name=None, comment=None, tableType=None, headerRowCount=1, insertRow=None, insertRowShift=None, totalsRowCount=None, totalsRowShown=None, published=None, headerRowDxfId=None, dataDxfId=None, totalsRowDxfId=None, headerRowBorderDxfId=None, tableBorderDxfId=None, totalsRowBorderDxfId=None, headerRowCellStyle=None, dataCellStyle=None, totalsRowCellStyle=None, connectionId=None, autoFilter=None, sortState=None, tableColumns=(), tableStyleInfo=None, extLst=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

autoFilter

Values must be of type <class ‘openpyxl.worksheet.filters.AutoFilter’>

property column_names
comment

Values must be of type <class ‘str’>

connectionId

Values must be of type <class ‘int’>

dataCellStyle

Values must be of type <class ‘str’>

dataDxfId

Values must be of type <class ‘int’>

displayName

Values must be of type <class ‘str’>

extLst

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

headerRowBorderDxfId

Values must be of type <class ‘int’>

headerRowCellStyle

Values must be of type <class ‘str’>

headerRowCount

Values must be of type <class ‘int’>

headerRowDxfId

Values must be of type <class ‘int’>

id

Values must be of type <class ‘int’>

insertRow

Values must be of type <class ‘bool’>

insertRowShift

Values must be of type <class ‘bool’>

mime_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml'
name

Values must be of type <class ‘str’>

property path

Return path within the archive

published

Values must be of type <class ‘bool’>

ref
sortState

Values must be of type <class ‘openpyxl.worksheet.filters.SortState’>

tableBorderDxfId

Values must be of type <class ‘int’>

tableColumns

Wrap a sequence in an containing object

tableStyleInfo

Values must be of type <class ‘openpyxl.worksheet.table.TableStyleInfo’>

tableType

Value must be one of {‘worksheet’, ‘xml’, ‘queryTable’}

tagname = 'table'
to_tree()[源代码]
totalsRowBorderDxfId

Values must be of type <class ‘int’>

totalsRowCellStyle

Values must be of type <class ‘str’>

totalsRowCount

Values must be of type <class ‘int’>

totalsRowDxfId

Values must be of type <class ‘int’>

totalsRowShown

Values must be of type <class ‘bool’>

class openpyxl.worksheet.table.TableColumn(id=None, uniqueName=None, name=None, totalsRowFunction=None, totalsRowLabel=None, queryTableFieldId=None, headerRowDxfId=None, dataDxfId=None, totalsRowDxfId=None, headerRowCellStyle=None, dataCellStyle=None, totalsRowCellStyle=None, calculatedColumnFormula=None, totalsRowFormula=None, xmlColumnPr=None, extLst=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

calculatedColumnFormula

Values must be of type <class ‘openpyxl.worksheet.table.TableFormula’>

dataCellStyle

Values must be of type <class ‘str’>

dataDxfId

Values must be of type <class ‘int’>

extLst

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

classmethod from_tree(node)[源代码]

Create object from XML

headerRowCellStyle

Values must be of type <class ‘str’>

headerRowDxfId

Values must be of type <class ‘int’>

id

Values must be of type <class ‘int’>

name

Values must be of type <class ‘str’>

queryTableFieldId

Values must be of type <class ‘int’>

tagname = 'tableColumn'
totalsRowCellStyle

Values must be of type <class ‘str’>

totalsRowDxfId

Values must be of type <class ‘int’>

totalsRowFormula

Values must be of type <class ‘openpyxl.worksheet.table.TableFormula’>

totalsRowFunction

Value must be one of {‘min’, ‘sum’, ‘countNums’, ‘max’, ‘average’, ‘custom’, ‘count’, ‘var’, ‘stdDev’}

totalsRowLabel

Values must be of type <class ‘str’>

uniqueName

Values must be of type <class ‘str’>

xmlColumnPr

Values must be of type <class ‘openpyxl.worksheet.table.XMLColumnProps’>

class openpyxl.worksheet.table.TableFormula(array=None, attr_text=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

array

Values must be of type <class ‘bool’>

attr_text
tagname = 'tableFormula'
text

Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

class openpyxl.worksheet.table.TableList[源代码]

基类:dict

add(table)[源代码]
get(name=None, table_range=None)[源代码]

Return the value for key if key is in the dictionary, else default.

items() a set-like object providing a view on D's items[源代码]
class openpyxl.worksheet.table.TableNameDescriptor(*args, **kw)[源代码]

基类:openpyxl.descriptors.base.String

Table names cannot have spaces in them

class openpyxl.worksheet.table.TablePartList(count=None, tablePart=())[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

append(part)[源代码]
property count
tablePart

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

tagname = 'tableParts'
class openpyxl.worksheet.table.TableStyleInfo(name=None, showFirstColumn=None, showLastColumn=None, showRowStripes=None, showColumnStripes=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

name

Values must be of type <class ‘str’>

showColumnStripes

Values must be of type <class ‘bool’>

showFirstColumn

Values must be of type <class ‘bool’>

showLastColumn

Values must be of type <class ‘bool’>

showRowStripes

Values must be of type <class ‘bool’>

tagname = 'tableStyleInfo'
class openpyxl.worksheet.table.XMLColumnProps(mapId=None, xpath=None, denormalized=None, xmlDataType=None, extLst=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

denormalized

Values must be of type <class ‘bool’>

extLst

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

mapId

Values must be of type <class ‘int’>

tagname = 'xmlColumnPr'
xmlDataType

Values must be of type <class ‘str’>

xpath

Values must be of type <class ‘str’>