openpyxl.worksheet.page module

class openpyxl.worksheet.page.PageMargins(left=0.75, right=0.75, top=1, bottom=1, header=0.5, footer=0.5)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

Information about page margins for view/print layouts. Standard values (in inches) left, right = 0.75 top, bottom = 1 header, footer = 0.5

bottom

Values must be of type <class ‘float’>

footer

Values must be of type <class ‘float’>

header

Values must be of type <class ‘float’>

left

Values must be of type <class ‘float’>

right

Values must be of type <class ‘float’>

tagname = 'pageMargins'
top

Values must be of type <class ‘float’>

class openpyxl.worksheet.page.PrintOptions(horizontalCentered=None, verticalCentered=None, headings=None, gridLines=None, gridLinesSet=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

Worksheet print options

gridLines

Values must be of type <class ‘bool’>

gridLinesSet

Values must be of type <class ‘bool’>

headings

Values must be of type <class ‘bool’>

horizontalCentered

Values must be of type <class ‘bool’>

tagname = 'printOptions'
verticalCentered

Values must be of type <class ‘bool’>

class openpyxl.worksheet.page.PrintPageSetup(worksheet=None, orientation=None, paperSize=None, scale=None, fitToHeight=None, fitToWidth=None, firstPageNumber=None, useFirstPageNumber=None, paperHeight=None, paperWidth=None, pageOrder=None, usePrinterDefaults=None, blackAndWhite=None, draft=None, cellComments=None, errors=None, horizontalDpi=None, verticalDpi=None, copies=None, id=None)[源代码]

基类:openpyxl.descriptors.serialisable.Serialisable

Worksheet print page setup

property autoPageBreaks
blackAndWhite

Values must be of type <class ‘bool’>

cellComments

Value must be one of {‘atEnd’, ‘asDisplayed’}

copies

Values must be of type <class ‘int’>

draft

Values must be of type <class ‘bool’>

errors

Value must be one of {‘NA’, ‘blank’, ‘dash’, ‘displayed’}

firstPageNumber

Values must be of type <class ‘int’>

fitToHeight

Values must be of type <class ‘int’>

property fitToPage
fitToWidth

Values must be of type <class ‘int’>

classmethod from_tree(node)[源代码]

Create object from XML

horizontalDpi

Values must be of type <class ‘int’>

id

Values must be of type <class ‘str’>

orientation

Value must be one of {‘portrait’, ‘landscape’, ‘default’}

pageOrder

Value must be one of {‘overThenDown’, ‘downThenOver’}

paperHeight
paperSize

Values must be of type <class ‘int’>

paperWidth
scale

Values must be of type <class ‘int’>

property sheet_properties

Proxy property

tagname = 'pageSetup'
useFirstPageNumber

Values must be of type <class ‘bool’>

usePrinterDefaults

Values must be of type <class ‘bool’>

verticalDpi

Values must be of type <class ‘int’>