[Mono-devel-list] OpenOffice and Mono C#
torriem at chem.byu.edu
Sat Jul 3 11:57:40 EDT 2004
On Fri, 2004-07-02 at 16:44, Daniel Morgan wrote:
> Does anyone know how to programmtically use OpenOffice documents and
> spreadsheets from a Mono C# application.
Because OpenOffice uses standard, xml-based formats for it's files, you
can very easy to things like mail merge, reporting, etc. All you need
is xml parsing routines which are in the mono libraries. Each
openoffice document is split into several xml documents includng style
and content. Thus you can manipulate the content xml files and combine
that with the style xml to produce custom OO documents. So unlike MS
Office, you don't need to imbed some huge COM object to manipulate the
For an example of this, see
For an example app (not C# but illustrates the points) see
> I have done stuff, such as, Mail Merge a document template with a data
> source to create a new document with Microsoft Word and VBA. I also
> have created Excel spreadsheets and printed reports from Access mdb to
> PDF files via Acrobat. The PDF creation problem is no big deal - I
> could use Ghostscript.
> You can do this in VBA in a word doc or word doc template. Or you do it
> via a Word.Application and Word.Document objects in Visual Basic 6,
> Visual Basic.NET, and C#. Of course, this is using COM Interop for the
> .NET stuff.
> I would like to do the same, but I would like to use OpenOffice. The
> primary reason for using OpenOffice is cross-platform support. Since
> OpenOffice is open source, you are safe to store your documents,
> spreadsheets, and other files in a format that can be used for years to
> come. If Sun shuts down the OpenOffice project, you can always still
> use it or fix bugs.
> There have been many problems in the past about machine/os/apps becoming
> obsolete. Since they have become obsolete, there was no way to get
> these old archived documents since the old software was closed source.
> The new Office suite from Microsoft, Office 2003 is a security nightmare
> to admins. Office 2003 does a lot of things "for you" that in my
> opinion should be left up to the user, such as, going out to the
> internet to do various things without your knowledge. This is not my
> words, these words are those admins who support Office.
> Moreover, I would like to be able to create cross-platform applications
> written in C# for Mono that can interact with OpenOffice.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
Michael Torrie <torriem at chem.byu.edu>
More information about the Mono-devel-list