openpyxl.styles.stylesheet模块

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

在包含对象中包装序列

cellStyleXfs

值的类型必须为<class'openpyxl.styles.cell_style.cellstylelist'>

cellStyles

值的类型必须为<class'openpyxl.styles.named_styles._namedCellStyleList'>

cellXfs

值的类型必须为<class'openpyxl.styles.cell_style.cellstylelist'>

colors

值的类型必须为<class'openpyxl.styles.colors.colorlist'>

property custom_formats
dxfs

在包含对象中包装序列

extLst

值的类型必须为<class'openpyxl.descriptors.excel.extensionList'>

fills

在包含对象中包装序列

fonts

在包含对象中包装序列

classmethod from_tree(node)[源代码]
numFmts

值的类型必须为<class'openpyxl.styles.numbers.numberFormatList'>

tableStyles

值的类型必须为<class'openpyxl.styles.table.tableStyleList'>

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

将样式添加到工作簿(如果存在)

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