Home » excel » Java – generate complex excel report

Java – generate complex excel report

Posted by: admin May 14, 2020 Leave a comment


I’m trying change the system of excel generation in a project. Actually, for every report there is an excel template saved on the db, but for every little change I must work for one day, moving all the cell and formulas manually.
Unfortunately, is not a simple report like a normale table, is similar to a card with a lot of sub category. Here an example of the report:
Now, what’s the best way to create this kind of report? I try with Jasper, but there’s some memory problem and seems not so easy to create. The best way is to pass to the report a bean with all the informations.
Many thanks in advance to all of you.

How to&Answers:

Of course you may use Apache POI, JExcel API e.t.c. You may create Excel files template and fill data into static template file. But nevertheless it is require a lot of work to creating report.

What problem with memory do you had with Jasper and don’t have with POI? Jasper has great feature – Virtualizer which allow to build giant reports on the disk. Also iReport is a very useful tool to build Excel templates. Also, you can create a type of report view in one line.


If you want to use an excel template you can try JXLS. http://jxls.sourceforge.net/


Xylophone is another alternative for complex XLS reports. It is built on top of Apache POI. It uses Excel report template files and XML data sources.