styler#
- class Styler(bg_color=None, bold=False, font='Arial', font_size=12.0, font_color=None, number_format='General', protection=False, underline=None, border_type='thin', horizontal_alignment='center', vertical_alignment='center', wrap_text=True, shrink_to_fit=True, fill_pattern_type='solid', indent=0.0, comment_author=None, comment_text=None, text_rotation=0)[source]#
Used to represent a style
- Parameters:
bg_color (str: one of
utils.colors
, hex string or color name ie ‘yellow’ Excel supports) – The background colorbold (bool) – If
True
, a bold typeface is usedfont (str: one of
utils.fonts
or other font name Excel supports) – The font to usefont_size (int) – The font size
font_color (str: one of
utils.colors
, hex string or color name ie ‘yellow’ Excel supports) – The font colornumber_format (str: one of
utils.number_formats
or any other format Excel supports) – The format of the cell’s valueprotection (bool) – If
True
, the cell/column will be write-protectedunderline (str: one of
utils.underline
or any other underline Excel supports) – The underline typeborder_type (str: one of
utils.borders
or any other border type Excel supports) – The border type
New in version 1.2.
- Parameters:
horizontal_alignment (str: one of
utils.horizontal_alignments
or any other horizontal alignment Excel supports) – Text’s horizontal alignmentvertical_alignment (str: one of
utils.vertical_alignments
or any other vertical alignment Excel supports) – Text’s vertical alignment
New in version 1.3.
- Parameters: