Package Contents

easyxf(strg_to_parse="", num_format_str=None, field_sep=", ", line_sep=";", intro_sep=":", esc_char="\", debug=False)

This function is used to create and configure XFStyle objects for use with (for example) the Worksheet.write method.

Parameters:
  • strg_to_parse (str) –

    A string to be parsed to obtain attribute values for Alignment, Borders, Font, Pattern and Protection objects. Refer to the examples in the file .../examples/xlwt_easyxf_simple_demo.py and to the xf_dict dictionary in Style.py. Various synonyms including color/colour, center/centre and gray/grey are allowed. Case is irrelevant (except maybe in font names). ‘-‘ may be used instead of ‘_’.

    Example: "font: bold on; align: wrap on, vert centre, horiz center"
  • num_format_str (str) –

    To get the “number format string” of an existing cell whose format you want to reproduce, select the cell and click on Format/Cells/Number/Custom. Otherwise, refer to Excel help.

    Example: "#,##0.00", "dd/mm/yyyy"
Returns:

A XFStyle object

class Workbook

The class to instantiate to create a workbook

For more information about this class, see Workbook

class Worksheet

A class to represent the contents of a sheet in a workbook.

For more information about this class, see Worksheet

Previous topic

Welcome to xlwt3’s documentation!

Next topic

The Workbook Object

This Page