"I've had more success with docx4j than anything else"
"congratulations for the great job, I can do things that I cannot with POI or OpenOffice API !!"
"Now armed with docx4j, it was much easier to use the approach I envisioned to generate Word documents."
"I have been using docx4j over the last month on a new product, and I'm impressed and thankful for how much docx4j does."
"This library gives you everything you need to create/load/edit/write Word docx documents from Java, and comes with a Maven repo, online Javadoc, and nice set of Sample code. What more could you ask for? :-)"
"With docx4j we analyze and enrich each paragraph of a law project
containing more than 3000 paragraphs and this is done in less than 10
"thanks a lot for your good work. docx4j is easy to use and I like it."
Welcome to docx4j
docx4j is an open source (ASLv2) Java library for creating and manipulating Microsoft Open XML (Word docx, Powerpoint pptx, and Excel xlsx) files.
It is similar to Microsoft's OpenXML SDK, but for Java. docx4j uses JAXB to create the in-memory object representation.
Its emphasis is on power: if the file format supports it, you can do it with docx4j. But first, you'll need to take the time to understand JAXB, and the Open XML file structure
docx4j was created by Plutext Pty Ltd in 2008 - using OpenXML4J for the OPC piece. Plutext still drives the project, but since then docx4j has benefited from contributions from many individuals. The contributors are listed in docx4j's pom.xml.
Download docx4j, or compare the Docx4j Enterprise Edition
View sample code for docx4j,
docx4j documentation: cheat sheet ( PDF, PNG); and Getting Started (PDF)
Search Open XML spec documentation
View the structure of your docx/xlsx/pptx, and generate code
Get help via our forums, StackOverflow,
10 April 2014: docx4j 3.1.0 beta is available from docx4j-3.1.0-beta.jar. Highly recommended for PDF output.
More information. We expect 3.1 will be released
21 March 2014: Improvements to Google site search here and across Open XML spec documentation
6 March 2014: docx4j-ImportXHTML.NET 3.0.1 for .NET/C# project on GitHub and in Nuget
5 March 2014: docx4j.NET 3.0.1 for .NET/C# project on GitHub and in Nuget
12 Feb 2014: Docx4j Enterprise Edition consolidates Plutext's MergeDocx, MergePPtx, OLE Helper etc into a single product
10 Feb 2014: docx4j 3.0.1 is available
26 Nov 2013: docx4j 3.0 is available
15 July 2013: Import XHTML code moved into separate project (LGPL)
14 May 2013: docx4j online webapp which can generate docx4j code for you
15 Feb 2013: Commercial support offerings available from Plutext
A single A4 page reference/overview of docx4j aka a cheat sheet is available, in PDF or PNG format. It condenses much of the Getting Started guide to a single page.
Our Getting Started guide is available in HTML and PDF, and in Russian ( HTML , PDF).
The HTML version is also available in some other languages (these are machine translations, and from April 2010, so they are a bit dated now):
docx4all is an open source cross platform WYSIWYG editor for docx files, written in Java Swing and JavaFX Script, released under the GPL
DocxEditorKit can open docx files and display the content in JEditorPane (or JTextPane), and save back to docx format.
docx4j for eclipse-scout. See the HowTo
GDocx is a fluent interface for docx4j.
XPages PDF output
Articles about docx4j
lvdpal's Creating Word documents with Docx4j, which covers tables in some detail
Jos Dirksen's Create complex Word (.docx) documents programatically with docx4j
Glen Smith's Creating Word docx documents dynamically from Grails (or Java)
Свое представление (view) в Spring MVC (Russian)
Thanks people for taking the time to write these articles...