openpyxl.styles.fonts模块

class openpyxl.styles.fonts.Font(name=None, sz=None, b=None, i=None, charset=None, u=None, strike=None, color=None, scheme=None, family=None, size=None, bold=None, italic=None, strikethrough=None, underline=None, vertAlign=None, outline=None, shadow=None, condense=None, extend=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

样式中使用的字体选项。

UNDERLINE_DOUBLE = 'double'
UNDERLINE_DOUBLE_ACCOUNTING = 'doubleAccounting'
UNDERLINE_SINGLE = 'single'
UNDERLINE_SINGLE_ACCOUNTING = 'singleAccounting'
b

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

bold

在python中不允许或混淆所需的属性名(例如“type”)或需要更具描述性的名称(例如“u”的“underline”)时,可以使用别名。

charset

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

color

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

condense

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

extend

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

family

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

classmethod from_tree(node)[源代码]

如果存在子元素,则设置下划线的默认值

i

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

italic

在python中不允许或混淆所需的属性名(例如“type”)或需要更具描述性的名称(例如“u”的“underline”)时,可以使用别名。

name

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

outline

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

scheme

Value must be one of {'major', 'minor'}

shadow

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

size

在python中不允许或混淆所需的属性名(例如“type”)或需要更具描述性的名称(例如“u”的“underline”)时,可以使用别名。

strike

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

strikethrough

在python中不允许或混淆所需的属性名(例如“type”)或需要更具描述性的名称(例如“u”的“underline”)时,可以使用别名。

sz

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

tagname = 'font'
u

Value must be one of {'single', 'doubleAccounting', 'singleAccounting', 'double'}

underline

在python中不允许或混淆所需的属性名(例如“type”)或需要更具描述性的名称(例如“u”的“underline”)时,可以使用别名。

vertAlign

Value must be one of {'superscript', 'baseline', 'subscript'}