Skip to content

Instantly share code, notes, and snippets.

@firegloves
Last active July 12, 2019 09:43
Show Gist options
  • Save firegloves/cd04561ced06421e58db639f0208dffd to your computer and use it in GitHub Desktop.
Save firegloves/cd04561ced06421e58db639f0208dffd to your computer and use it in GitHub Desktop.
MemPOI - Bundled template example
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))
.withStyleTemplate(new SummerStyleTemplate())
.build();
// exports to file
memPOI.prepareMempoiReportToFile().get();
} catch (ExecutionException e) {
System.out.println(e.getCause().getMessage());
} catch (InterruptedException e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment