Dynamic Generation of Microsoft Office Documents
using Open Office

Darren Shu

thshufits at gmail.com



In my particular case, the corporate document format standard was Microsoft Word. Your milage may vary, but many sources will say validate that Microsoft dominates the office document format.

Benefits (Cost)

During a brief research period, the only other development library available was through Soft Artisans for $1200. Some organizations may find this to be an acceptable cost.

Benefits (Improved Stability)

Basically, Microsoft didn't design the Office suite to be automated in a server environment. In my own personal experience using .NET libraries in 2005, there was a bug (and still might be) that kept an Excel process that did not properly close during automation. While searching for a solution, I came across the Microsoft Knowledge Base article. OpenOffice has it's share of bugs as well, but can potentially be more stable in another environment because the developers design it that way.


Overview 1/7

Example code doesn't use a database. This was what was used in production.

Overview 2/7

Overview 3/7

Overview 4/7

Overview 5/7

Example code only demonstrates the generation of the word document. The other steps are up to the interested reader.

Overview 6/7

Overview 7/7

Setup Tips

There are probably other ways of finding the files if slocate wasn't emerged. You can also use:
$ find / -name "uno.py" -print



To get more information