Saelyth
Saelyth

Reputation: 1734

Is it possible to edit MS word doc files with Python?

I need to create a lot of old .doc files (MS word 97) and I'm wondering if there is any way to do in Python 3. I've been researching around but all I can find are libraries for the newer .docx files or playing with the OpenOffice API.

The output files would be just a .doc file with specific formatting and some tables with text inside the cells. No images or fancy stuff needed, but I hesitate on installing external programs like OpenOffice because this script will need to run on a few different computers. So I'm wondering if there is just a library that I can import.

I accept suggestions for other programming languages as well, but Python would be perfect.

Upvotes: 6

Views: 5804

Answers (1)

Arkadiusz Tymieniecki
Arkadiusz Tymieniecki

Reputation: 116

yes, try http://python-docx.readthedocs.io/en/latest/

to install:

pip install python-docx

Upvotes: 5

Related Questions