PyExcelerate also permits you to write data to ranges directly, which is faster than writing cell-by-cell.

Note that .style.format.format ’s repetition is due to planned support for conditional formatting and other related features. The formatting syntax may be improved in the future.

Styling cells causes non-negligible overhead. It will increase your execution time (up to 10x longer if done improperly!). Only style cells if absolutely necessary.

A simpler (and faster) way to style an entire row.

Available style attributes

Consistent with the implementation patterns above, the following style parameters are available:

ws[1][1].style.font.bold = True ws[1][1].style.font.italic = True ws[1][1].style.font.underline = True ws[1][1].style.font.strikethrough = True ws[1][1].style.font.color = Color(255, 0, 255) ws[1][1].style.fill.background = Color(0, 255, 0) ws[1][1].style.alignment.vertical = 'top' ws[1][1].style.alignment.horizontal = 'right' ws[1][1].style.alignment.rotation = 90 ws[1][1].style.alignment.wrap_text = True ws[1][1].style.borders.top.color = Color(255, 0, 0) ws[1][1].style.borders.right.style = '-.'

Each attribute also has constructors for implementing via set_cell_style() .