4 Years
Discussion Span
Last Post by AffineMesh

The Apache OpenOffice API Project

COM Interop Tutorials

If your needs are simple you might find you can get away with writing Calc documents directly, rather than automating OpenOffice. Calc documents are zipped files and the contents are mostly XML based. It's an open format and reasonably well [cough] documented. So if you know a little XML it shouldn't be too difficult to modify an existing file.

The disadvantage of this approach comes when the OpenOffice format is revised you may need to update your output accordingly.

Automating OpenOffice will help to maintain compatibility, but you need to bear in mind that it is essentially an interactive application. If you are running your software as a service and OpenOffice unexpectedly decides to throw up a dialog box, it will not be seen by the user. Instead your application will appear to hang, while it is waiting for the user's response.

Documentation for the OpenOffice API includes support for several languages, but doesn't explicitly mention csharp. There may be a better way to automate OO, but you should find using the OLE interface in combination with COM Interop will do the trick.

Edited by AffineMesh

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.