openpyxl.styles.differential module

class openpyxl.styles.differential.DifferentialStyle(font=None, numFmt=None, fill=None, alignment=None, border=None, protection=None, extLst=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

alignment

Values must be of type <class ‘openpyxl.styles.alignment.Alignment’>

border

Values must be of type <class ‘openpyxl.styles.borders.Border’>

fill

Values must be of type <class ‘openpyxl.styles.fills.Fill’>

font

Values must be of type <class ‘openpyxl.styles.fonts.Font’>

numFmt

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

protection

Values must be of type <class ‘openpyxl.styles.protection.Protection’>

tagname = 'dxf'
class openpyxl.styles.differential.DifferentialStyleList(dxf=())[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

Deduping container for differential styles.

add(dxf)[源代码]

Add a differential style and return its index

append(dxf)[源代码]

Check to see whether style already exists and append it if does not.

dxf

A sequence (list or tuple) that may only contain objects of the declared type

styles

Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptve name is desired (eg. “underline” for “u”)

tagname = 'dxfs'