Open Source Java Library for Spreadsheet Documents

Create, Read, Edit and Convert Microsoft Excel Spreadsheet files in Java applications via Open Source API.


DOCX4J is similar to Microsoft's OpenXML SDK, but for Java. DOCX4J is JAXB-based open source(Apache v2) library for manipulating Mircorsoft Office file formats. It provides the functionality to read, write, edit & and save XLSX file format.  

Using the API you can generate Spreadsheet documents, edit them, format the text & paragraphs,insert charts, insert tables & images and manage other form elements and much more. Basically, it emphasis is on power, if the format supports it you can do it using the API.

Getting Started with DOCX4J

First of all, you need to have the Java Development Kit (JDK) installed on your system. Referencing DOCX4J in your Maven-based Java project is even simpler. All you need is to add the following dependency in your pom.xml and let your IDE fetch and reference the DOCX4J Jar files.

DOCX4J Maven Dependency


Java Library to Read & Write XLSX

It is a powerful library to Create & Manipulate exisitng as well as new XLSX file format. It enables the developers to access and read data from a specific sheet inside a spreadsheet. Usually a spreadsheet contains several worksheets. If a user is interested to read data from only one sheet and skip the other sheets.

Work with Spreadsheet Cells using Java API

DOCX4J allows you to access cell and set its value by coordinates. You can also create a new cell and set up a formula in it. You can also configure the cell to occupy various types of data, such as date, time, and number with leading zeros.