-
Notifications
You must be signed in to change notification settings - Fork 7
Simple text header and footer
firegloves edited this page Jul 20, 2022
·
1 revision
Starting by v1.9 MemPOI supports the addition of a textual header before the exported data.
To add the text header you can simply add a line in the desired MempoiSheetBuilder
as follows:
MempoiSheetBuilder.aMempoiSheet()
.withSheetName(catsSheetName)
.withSimpleHeaderText("My simple header")
.withPrepStmt(conn.prepareStatement(catsQuery))
.build();
The result will be something like this:
The simple text header is compatible with the rows and columns offset.
Starting by v1.9 MemPOI supports the addition of a textual footer after the exported data.
To add the text footer you can simply add a line in the desired MempoiSheetBuilder
as follows:
MempoiSheetBuilder.aMempoiSheet()
.withSheetName(birdsSheetName)
.withSimpleFooterText("My simple footer")
.withPrepStmt(conn.prepareStatement(birdsQuery))
.build();
The result will be something like this:
The simple text footer is compatible with the rows and columns offset.