Python, COM & Excel

Thomas Guettler pan-newsreader at
Wed Jan 22 08:04:26 CET 2003

On Tue, 21 Jan 2003 23:42:23 +0100, Mike Brenner wrote:

>> There is a different way to
>> combine MS-Office and Python: XML.
>> Write yourself a small SAX parser
>> and change the things you want to
>> change and then write it back to XML.
> Hi Tom,
> I understand that xml goes well with Python; however, I don't understand
> how xml integrates well with MS-Office, particularly EXCEL.
> If I have an Excel Spreadsheet, are you saying that there is a way to
> get it into XML and that there is away to get that XML back into EXCEL?
> I would like to know how to do that, particularly with merged cells,
> cells with different borders from their neighbors, filters, and macros.

Hi Mike!

I had only simple needs. I did not work with merged cells or filters.
But the XML is quite readable. It should be possible to parse it,
find the parts you are interested in, change them and write the whole
thing back.

Or you could access an excel spreadsheet via odbc. But I think that
this won't work with merged cells.


Thomas Guettler <guettli at>

More information about the Python-list mailing list