Meja is a library for handling tabular data such as Excel-Sheets, CSV-data etc.
As it's rather common to give everything Java related a name of indo/malay origin, I chose 'meja' which is the indonesian word for table (as in furniture).
- The Minimal Java version for the upcoming version 8.x is be Java 21.
- The Java 17 compatible version 7.x will be maintained until the next LTS Java version (Java 25) is released. Note that Java 21/JavaFX 21 is already needed in version 7.x for all JavaFX related modules.
Meja is available in the Maven central repository.
You need at least the following modules:
meja
: core functionality, CSV import and export, HTML exportmeja-generic
: generic implementation (memory efficient)
Add any combination of the following as needed:
meja-poi
: Apache POI based implementation (supports Excel XLSX and XLS file format)meja-db
: for reading data directly from JDBC result setsmeja-swing
: for displaying sheets and workbooks in Swing applicationsmeja-fx
: for displaying sheets and workbooks in JavaFX applications
Maven
<dependency>
<groupId>com.dua3.meja</groupId>
<artifactId>[meja_module]</artifactId>
<version>[meja_version]</version>
</dependency>
Gradle (Groovy DSL)
implementation 'com.dua3.meja:[meja_module]:[meja_version]'
Gradle (Kotlin DSL)
implementation("com.dua3.meja:[meja_module]:[meja_version]")
Java 21 is required for building Meja.
Clone the repository and run ./gradlew build
to build the library, ./gradlew publishToMavenLocal
to publish to
your local Maven repository.
Meja is released under the Apache License 2.0.
Meja consists of different modules, each providing different functionality.
This is the base module providing functionality shared by different models.
A generic Workbook implementation. Fast and memory efficient. Use this implementation when creating workbooks in memory. Also defines the CSV FileType.
An implementation backed by the Apache POI implementation of the Microsoft Office Excel file format. Defines FileTypes for xls and xlsx files. Use this implementation to read and modify Excel files.
Defines Swing controls for displaying Sheets and Workbooks.
Several small samples to demonstrate how to use this library.
Utilities for JavaFX.
Meja uses Log4J2-API as logging facade, the same as the Apache POI library that is used for reading and writing Excel files.
Meja uses Cabe to ensure correct handling of null
values.
This means that:
-
Only parameters marked as
@Nullable
acceptnull
values. Whennull
is passed for a parameter not marked as@Nullable
, anIllegalArgumentException
is thrown. The name of the offending parameter is given in the exception message. -
Only methods where the return value is marked as
@Nullable
will ever returnnull
.