How to create .odt files with C#.NET?

18,053

Solution 1

Have a look at AODL (see http://odftoolkit.org/projects/odftoolkit/pages/AODL).

  • fully managed .NET 1.1 (so it runs on MS.Net and Mono)
  • support for text and spreadsheet documents
  • create, read, edit, save documents
  • ...

EDIT by kame: New link AODL-Wiki

Solution 2

You might be interested in OpenOffice, UNO CLI Language Binding.

Solution 3

You can check out the OASIS Standards site for information on the ODT standard. From what I've seen, they're using an XML based standard and have an XSD available for the the document standard, so you could use that in conjunction with your own code to build a document file in the proper format.

Solution 4

I found this one yesterday when looking for a way to create Spreadsheeets, it looks like creating writer files is quite similar: http://www.suite101.com/content/creating-an-openoffice-calc-document-with-c-a124112, dont forget to install the Open Office SDK from Oracle first.

Unfortunately I have not found a way to create a file without opening it yet.

Share:
18,053
IrishGuy
Author by

IrishGuy

Professional software developer, interested in all aspects of consumer internet and enterprise software. Experience developing solutions for: retail, advertising, finance and telco industries. Specialties: Software design and development. Planning and task execution, pushing software projects to "go live". Strong experience using: TDD, Scrum, SEO Tools and Analytics. Interested in marketing and brand development, management, coaching, leadership, payment solutions and financial services. Preferred Languages: Java, PHP, Python, Node DB: DB2, Sybase, MySQL, SQLite3 BPM: Pega 7.x

Updated on June 07, 2022

Comments

  • IrishGuy
    IrishGuy almost 2 years

    Note: I found this "Creating a Word Doc in C#.NET", but that is not what I want.

    Do you know how to create a .odt to create file from C# .NET?
    Is there a .NET component or wrapper for an OpenOffice.org library to do this?

  • Alex
    Alex over 9 years
    The official version of AODL for .NET is not available anymore. But there a some forks you can still use. The best forks I found (with addional fixes of the authors) are aodl-reloaded and aodl. But I know there are still some issues using current versions of OpenOffice/LibreOffice.
  • adabru
    adabru about 5 years
    This answer suits me best. @movAX13h could you consider adding the link to the official spec docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/… to your answer? To be a top notch answer someone could also add a code sample.