-
Notifications
You must be signed in to change notification settings - Fork 7
Basic usage
firegloves edited this page Jul 20, 2022
·
1 revision
All you need is to instantiate a MemPOI passing it the List of your exporting queries. MemPOI will do all the stuff for you generating a .xlsx file containing resulting data.
You need to pass your export queries as a List of MempoiSheet (PreparedStatement + sheet name).
You can use MempoiBuilder to correctly populate your MemPOI instance, like follows:
MemPOI memPOI = MempoiBuilder.aMemPOI()
.addMempoiSheet(new MempoiSheet(prepStmt))
.build();
CompletableFuture<MempoiReport> future = memPOI.prepareMempoiReport();You can find more examples in the functional tests package.
By default SXSSFWorkbook is used, but these are the supported Workbook's descendants:
SXSSFWorkbookXSSFWorkbookHSSFWorkbook
Multiple sheets supported - Each MempoiSheet will add a sheet to the generated report