The document generator can be used as a component in .Net application to generate documents in OOXML or ODF format.
Document generator does not require any installation. Download the zip file with the latest version and extract the contents to a directory of choice.
Create a new instance of the TextDocument object:
var doc = TextDocument.Create(fileName, true);
fileName: The name of the document, that will be used to save the document.
true: Indicates that the component can override an existing file with the same name.
Add a paragraph to the document:
var paragraph = doc.AddParagraph(Header, Text, Level);
Header: The header of the paragraph
Text: The text of the paragraph
Level: The paragraph level. This value is used to associate the paragraph with a style, e.g. Level =1 will associate the header with the style Header 1
doc.Save(DocumentType);
DocumentType: DocumentType.OOXMLTextDocument saves the document as OOXML and DocumentType.ODFTextDocument saves the document as ODF.
More info about the possibilties of the library can be found here .