Introduction
This tutorial covers the following libraries:
xlrd
• http://pypi.python.org/pypi/xlrd
• reading data and formatting from .xls files
• this tutorial covers version 0.7.1
• API documentation can be found at:
◦ https://secure.simplistix.co.uk/svn/xlrd/trunk/xlrd/doc/xlrd.html
xlwt
• http://pypi.python.org/pypi/xlwt
• writing data and formatting to .xls files
• this tutorial covers version 0.7.2
• incomplete API documentation can be found at:
◦ https://secure.simplistix.co.uk/svn/xlwt/trunk/xlwt/doc/xlwt.html
• fairly complete examples can be found at
◦ https://secure.simplistix.co.uk/svn/xlwt/trunk/xlwt/examples/
xlutils
• http://pypi.python.org/pypi/xlutils
• a collection of utilities using both xlrd and xlwt:
◦ copying data from a source to a target spreadsheet
◦ filtering data from a source to a target spreadsheet
• this tutorial covers version 1.3.0 and above.
• documentation and examples can be found at:
◦ https://secure.simplistix.co.uk/svn/xlutils/trunk/xlutils/docs/
There are still reasons why automating an Excel instance via COM is necessary:
• manipulation of graphs
• rich text cells
• reading formulae in cells
• working with macros and names
• the more esoteric things found in .xls files