Read word tables

Thomas Guettler guettli at thomas-guettler.de
Tue Dec 21 14:49:48 CET 2004


Am Tue, 21 Dec 2004 11:24:35 +0000 schrieb Rameshwari:

> 
> Hi,
> 
> I would like to read a ms-word document using python.
> 
> Basically the word document contains number of tables  and the rows 
> in each table do not have same number of columns.
> 
> Does anyone have a sample code to read a table?

Hi,

There is a small script[1] which parses the XML produced
by Excel. Something like this should be possible for msword, too.

Other way: You can export to the openoffice format and unzip it.
The read these xml files.

HTH,
  Thomas

[1]:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/192914

-- 
Thomas Güttler, http://www.thomas-guettler.de/





More information about the Python-list mailing list