Jxls v2.2.1 is released!

v2.2.1

  • Better support for SXSSF templates
  • JxlsHelper class to simplify the library usage. Getting Started guide and some of the examples were updated to use JxlsHelper.

v2.2.0

v2.1.1

  • SimpleExporter that allows you to generate an excel with a single line of code and without necessity to provide a template file.

Introduction

Jxls is a small Java library to make generation of Excel reports easy. Jxls uses a special markup in Excel templates to define output formatting and data layout.

Excel generation is required in many Java applications that have some kind of reporting functionality.

Java has great open-source and commercial libraries for creating Excel files (of open source ones worth mentioning are Apache POI and Java Excel API.

Those libraries are quite low-level in a sense that they require you to write a lot of Java code even to create simple Excel files.

Usually you have to manually set each cell formatting and data for the spreadsheet. Depending on the complexity of the report layout and data formatting the Java code can become quite complex and difficult to debug and maintain. In addition not all Excel features are supported and can be manipulated with API(for example macros or graphs). The suggested workaround for unsupported features is to create the object manually in an Excel template and fill the template with data after that.

Jxls takes this approach to a higher level. All you need to do when working with Jxls is just to define all your report formatting and data layout in an Excel template and run Jxls engine providing it with the data to fill in the template. The only code you need to write in the most cases is a simple invocation of Jxls engine with proper configuration.

Features

  • XML and binary Excel format output (depends on underlying low-level Java-to-Excel implementation)
  • Java collections output by rows and by columns
  • Conditional output
  • Expression language in report definition markup
  • Multi-spreadsheet generation
  • Native Excel formulas
  • Parameterized formulas
  • Merged cells support
  • Area listeners to adjust excel generation
  • Excel comments mark-up for command definition
  • XML mark-up for command definition
  • Custom Command definition