Last active
July 11, 2019 14:21
-
-
Save firegloves/b349006d8e3b6a1e3a0c124518709bb0 to your computer and use it in GitHub Desktop.
MemPOI - The most basic example returning created filename's String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
// creates destination file | |
File file = new File("test.xlsx"); | |
// creates MemPOI using its builder | |
MemPOI memPOI = MempoiBuilder.aMemPOI() | |
.withFile(file) | |
.addMempoiSheet(new MempoiSheet(prepStmt)) | |
.build(); | |
// exports to file | |
CompletableFuture<String> fut = memPOI.prepareMempoiReportToFile(); | |
// gets the generated report absolute filename | |
String absoluteFileName = fut.get(); | |
} catch (Exception e) { | |
throw new MempoiRuntimeException(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment