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)[source]

Bases: 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 {‘queryTable’, ‘xml’, ‘worksheet’}

tagname = 'table'
to_tree()[source]
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)[source]

Bases: 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)[source]

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 {‘countNums’, ‘sum’, ‘count’, ‘custom’, ‘average’, ‘var’, ‘max’, ‘min’, ‘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)[source]

Bases: 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 descriptive name is desired (eg. “underline” for “u”)

class openpyxl.worksheet.table.TableList[source]

Bases: dict

add(table)[source]
get(name=None, table_range=None)[source]

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[source]
class openpyxl.worksheet.table.TableNameDescriptor(*args, **kw)[source]

Bases: String

Table names cannot have spaces in them

class openpyxl.worksheet.table.TablePartList(count=None, tablePart=())[source]

Bases: Serialisable

append(part)[source]
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)[source]

Bases: 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)[source]

Bases: 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’>