openpyxl.styles.stylesheet module

class openpyxl.styles.stylesheet.Stylesheet(numFmts=None, fonts=(), fills=(), borders=(), cellStyleXfs=None, cellXfs=None, cellStyles=None, dxfs=(), tableStyles=None, colors=None, extLst=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

borders

Wrap a sequence in an containing object

cellStyleXfs

Values must be of type <class ‘openpyxl.styles.cell_style.CellStyleList’>

cellStyles

Values must be of type <class ‘openpyxl.styles.named_styles._NamedCellStyleList’>

cellXfs

Values must be of type <class ‘openpyxl.styles.cell_style.CellStyleList’>

colors

Values must be of type <class ‘openpyxl.styles.colors.ColorList’>

property custom_formats
dxfs

Wrap a sequence in an containing object

extLst

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

fills

Wrap a sequence in an containing object

fonts

Wrap a sequence in an containing object

classmethod from_tree(node)[源代码]

Create object from XML

numFmts

Values must be of type <class ‘openpyxl.styles.numbers.NumberFormatList’>

tableStyles

Values must be of type <class ‘openpyxl.styles.table.TableStyleList’>

tagname = 'styleSheet'
to_tree(tagname=None, idx=None, namespace=None)[源代码]
openpyxl.styles.stylesheet.apply_stylesheet(archive, wb)[源代码]

Add styles to workbook if present

openpyxl.styles.stylesheet.write_stylesheet(wb)[源代码]