openpyxl.worksheet.dimensions module¶
- class openpyxl.worksheet.dimensions.ColumnDimension(worksheet, index='A', width=13, bestFit=False, hidden=False, outlineLevel=0, outline_level=None, collapsed=False, style=None, min=None, max=None, customWidth=False, visible=None, auto_size=None)[源代码]¶
基类:
openpyxl.worksheet.dimensions.Dimension
Information about the display properties of a column.
- auto_size¶
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”)
- bestFit¶
Values must be of type <class ‘bool’>
- collapsed¶
Values must be of type <class ‘bool’>
- property customWidth¶
Always true if there is a width for the column
- index¶
Values must be of type <class ‘str’>
- max¶
Values must be of type <class ‘int’>
- min¶
Values must be of type <class ‘int’>
- parent¶
- width¶
Values must be of type <class ‘float’>
- class openpyxl.worksheet.dimensions.Dimension(index, hidden, outlineLevel, collapsed, worksheet, visible=True, style=None)[源代码]¶
基类:
openpyxl.descriptors.Strict
,openpyxl.styles.styleable.StyleableObject
Information about the display properties of a row or column.
- collapsed¶
Values must be of type <class ‘bool’>
Values must be of type <class ‘bool’>
- index¶
Values must be of type <class ‘int’>
- outlineLevel¶
Values must be of type <class ‘int’>
- outline_level¶
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”)
- parent¶
- style¶
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”)
- class openpyxl.worksheet.dimensions.DimensionHolder(worksheet, reference='index', default_factory=None)[源代码]¶
基类:
openpyxl.utils.bound_dictionary.BoundDictionary
Allow columns to be grouped
- group(start, end=None, outline_level=1, hidden=False)[源代码]¶
allow grouping a range of consecutive rows or columns together
- 参数
start – first row or column to be grouped (mandatory)
end – last row or column to be grouped (optional, default to start)
outline_level – outline level
hidden – should the group be hidden on workbook open or not
- class openpyxl.worksheet.dimensions.RowDimension(worksheet, index=0, ht=None, customHeight=None, s=None, customFormat=None, hidden=False, outlineLevel=0, outline_level=None, collapsed=False, visible=None, height=None, r=None, spans=None, thickBot=None, thickTop=None, **kw)[源代码]¶
基类:
openpyxl.worksheet.dimensions.Dimension
Information about the display properties of a row.
- property customFormat¶
Always true if there is a style for the row
- property customHeight¶
Always true if there is a height for the row
- height¶
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”)
- ht¶
Values must be of type <class ‘float’>
- parent¶
- r¶
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”)
- s¶
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”)
- thickBot¶
Values must be of type <class ‘bool’>
- thickTop¶
Values must be of type <class ‘bool’>
- class openpyxl.worksheet.dimensions.SheetDimension(ref=None)[源代码]¶
基类:
openpyxl.descriptors.serialisable.Serialisable
- property boundaries¶
- ref¶
Values must be of type <class ‘str’>
- tagname = 'dimension'¶
- class openpyxl.worksheet.dimensions.SheetFormatProperties(baseColWidth=8, defaultColWidth=None, defaultRowHeight=15, customHeight=None, zeroHeight=None, thickTop=None, thickBottom=None, outlineLevelRow=None, outlineLevelCol=None)[源代码]¶
基类:
openpyxl.descriptors.serialisable.Serialisable
- baseColWidth¶
Values must be of type <class ‘int’>
- customHeight¶
Values must be of type <class ‘bool’>
- defaultColWidth¶
Values must be of type <class ‘float’>
- defaultRowHeight¶
Values must be of type <class ‘float’>
- outlineLevelCol¶
Values must be of type <class ‘int’>
- outlineLevelRow¶
Values must be of type <class ‘int’>
- tagname = 'sheetFormatPr'¶
- thickBottom¶
Values must be of type <class ‘bool’>
- thickTop¶
Values must be of type <class ‘bool’>
- zeroHeight¶
Values must be of type <class ‘bool’>