1. Manfred Moitzi
  2. xlwt3


Clone wiki

xlwt3 / Home

Development stopped

In the furture the binary XLS format will be replaced by open XML based Standards, so my focus is now on the OpenDocument Format. (see https://bitbucket.org/mozman/ezodf)

There will be no further development of xlwt3, just bugfixes. I doubt that there will ever be a stable version of xlwt3.



"xlwt3" is the Python 3 port of "xlwt" 0.7.2

"xlwt3" is 100% API compatible to "xlwt" 0.7.2

Provide a library for developers to use to generate spreadsheet files compatible with Microsoft Excel versions 95 to 2003.


  • xlwt -- John Machin, Lingfo Pty Ltd <sjmachin AT lexicon.net>
  • xlwt3 -- Manfred Moitzi, Python 3 port <mozman AT gmx.at>


BSD-style (see licences.py)

External modules required

The package itself is pure Python with no dependencies on modules or packages outside the standard Python distribution.

Quick start:

    import xlwt3
    from datetime import datetime

    style0 = xlwt.easyxf('font: name Times New Roman, color-index red, bold on',
    style1 = xlwt.easyxf(num_format_str='D-MMM-YY')

    wb = xlwt.Workbook()
    ws = wb.add_sheet('A Test Sheet')

    ws.write(0, 0, 1234.56, style0)
    ws.write(1, 0, datetime.now(), style1)
    ws.write(2, 0, 1)
    ws.write(2, 1, 1)
    ws.write(2, 2, xlwt.Formula("A3+B3"))



Any OS: Unzip the .zip file into a suitable directory, chdir to that directory, then do::

    python setup.py install


    pip install xlwt3

Download URLs

PyPI: http://pypi.python.org/pypi/xlwt3

Bitbucket: https://bitbucket.org/mozman/xlwt3/downloads


Use the original "xlwt" 0.7.2 documention at https://secure.simplistix.co.uk/svn/xlwt/trunk/xlwt/doc/xlwt.html or http://packages.python.org/xlwt3/ and replace every "xlwt" with "xlwt3" or use:

  import xlwt3 as xlwt

Documentation can be found in the 'doc' directory of the xlwt3 package. If these aren't sufficient, please consult the code in the examples directory and the source code itself.


Try the following in this order:

  • Read the source
  • Ask a question on http://groups.google.com/group/python-excel/
  • E-mail the xlwt maintainer <sjmachin AT lexicon.net>, including "[xlwt]" as part of the message subject.
  • E-mail the xlwt3 maintainer <mozman AT gmx.at>, including "[xlwt]" as part of the message subject.


  • xlwt is a fork of the pyExcelerator package, which was developed by Roman V. Kiseliov.
  • "This product includes software developed by Roman V. Kiseliov <roman AT kiseliov.ru>."
  • xlwt uses ANTLR v 2.7.7 to generate its formula compiler.
  • a growing list of names; see HISTORY.html: feedback, testing, test files, ...