Export Excel with pivot table using EasyXLS library! XLSX, XLSM, XLSB, XLS file in Java.
https://www.easyxls.com/manual/tutorials/java/create-excel-pivot-table.html