Tuesday, July 20, 2010

MS Word and Python - Helpful links

Recently I was asked to develop a geoprocessing script that creates a MS Word Doc.  Here were some links that helped me out:
http://www.blog.pythonlibrary.org/2010/07/16/python-and-microsoft-office-using-pywin32/
http://libjoe.blogspot.com/2009/07/embedding-images-in-word-pythoncvb.html
http://win32com.goermezer.de/content/category/7/86/192/
http://code.activestate.com/recipes/279003/
http://www.daniweb.com/forums/thread129924.html

This is for excel:
http://www.python-excel.org/


Enjoy Everyone!

2 comments:

Michalis Avraam said...

Great info to have!

I know that this is not exactly what you asked for, but you can generate RTF files easily with Python (PyRTF). Microsoft Word can read these RTF files easily, hence you will not need to use the win32com at all (meaning portable to other OS and to people that don't own Word). Another alternative is python-uno, which allows you to control OpenOffice.org from Python, which can build Word Docs as well.

Andrew said...

Great point!
RTF and Open office are great options (especiall if you don't own office), but sometimes a client wants a doc file or an xls.