openpyxl.styles.named u样式模块

class openpyxl.styles.named_styles.NamedStyle(name='Normal', font=<openpyxl.styles.fonts.Font object> Parameters: name=None, charset=None, family=None, b=False, i=False, strike=None, outline=None, shadow=None, condense=None, color=None, extend=None, sz=None, u=None, vertAlign=None, scheme=None, fill=<openpyxl.styles.fills.PatternFill object> Parameters: patternType=None, fgColor=<openpyxl.styles.colors.Color object> Parameters: auto=None, type='rgb', theme=None, rgb='00000000', indexed=None, tint=0.0, bgColor=<openpyxl.styles.colors.Color object> Parameters: auto=None, type='rgb', theme=None, rgb='00000000', indexed=None, tint=0.0, border=<openpyxl.styles.borders.Border object> Parameters: diagonalUp=False, outline=True, diagonalDown=False, start=None, end=None, left=<openpyxl.styles.borders.Side object> Parameters: style=None, color=None, right=<openpyxl.styles.borders.Side object> Parameters: style=None, color=None, top=<openpyxl.styles.borders.Side object> Parameters: style=None, color=None, bottom=<openpyxl.styles.borders.Side object> Parameters: style=None, color=None, diagonal=<openpyxl.styles.borders.Side object> Parameters: style=None, color=None, vertical=None, horizontal=None, alignment=<openpyxl.styles.alignment.Alignment object> Parameters: horizontal=None, readingOrder=0.0, justifyLastLine=None, wrapText=None, textRotation=0, indent=0.0, vertical=None, shrinkToFit=None, relativeIndent=0.0, number_format=None, protection=<openpyxl.styles.protection.Protection object> Parameters: locked=True, hidden=False, builtinId=None, hidden=False, xfId=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

命名样式和可编辑样式

alignment

值的类型必须小于class“openpyxl.styles.Alignment.Alignment”>

as_name()[源代码]

返回相关命名样式

as_tuple()[源代码]

返回表示当前样式的样式数组

as_xf()[源代码]

返回等效XF样式

bind(wb)[源代码]

将命名样式绑定到工作簿

border

值的类型必须为<class'openpyxl.styles.borders.border'>

builtinId

值的类型必须小于class“int”>

fill

值的类型必须为<class'openpyxl.styles.fills.fill'>

font

值的类型必须为<class'openpyxl.styles.fonts.font'>

hidden

值的类型必须小于class'bool'>

name

值的类型必须小于class'str'>

number_format

值的类型必须小于class'str'>

protection

值的类型必须小于class“openpyxl.styles.protection.protection”>

xfId

命名样式列表中样式的索引

class openpyxl.styles.named_styles.NamedStyleList[源代码]

基类:list

命名样式是可编辑的,可以应用于多个对象

由于索引只存储在引用对象中,所以必须保留其顺序。

append(object) → None -- append object to end[源代码]
names