user3450524
user3450524

Reputation: 125

Using Python (v2.7.6) to generate reports in Word

I am an absolute novice and was wondering if this would be a simple enough project for me.

I write loads of reports using pretty much the same group of paragraphs, which would only require minor changes each time (such as quantities, etc.). Is it simple enough to write a script to automate this process?

Upvotes: 0

Views: 301

Answers (2)

Roland Smith
Roland Smith

Reputation: 43495

Have a look at python-docx. It can create and update docx format Word documents.

The documentation starts with an example.

Upvotes: 1

Steve Barnes
Steve Barnes

Reputation: 28370

I would recommend using python to generate your reports in markdown or reStructuredText format and then if you have to have Word as the final output run the output through a tool such as pandoc to produce what ever format you need.

Upvotes: 0

Related Questions