Java to Word conversion

I am looking to export text from Java to a word document.

I draw text from various sections of a Java program and format these into a word document as follows.
Standard text is just exported as text into the word document.
Headers need to be exported to Word and I need to be able to format the Headers in the same style as Word. So I have a Title to the document which needs to be formatted with the Title style in a word document. then I have a series of headers which I allocate a number to and these are then exported as
Heading1, Heading2 exactly as laid out in the Styles in a Word document. Does this program achieve the conversion of text from Java into word and is it able to create the necessary Styles required.
the current opensource program I use only changes the font size but does not create the Style required.
Thanks
JB

Hi there,


Thanks for your inquiry. With Aspose.Words you can generate, modify, convert, render and print documents without utilizing Microsoft Word®.

Please refer to the following articles:
Use DocumentBuilder to Insert Document Elements
Using DocumentBuilder to Modify a Document

Please use Paragraph.ParagraphFormat.Style property to get or set the paragraph style applied to this formatting.

If you still face problem, please share your input and expected output documents here for our reference. We will then provide you more information about your query.