Apache POI Page Number
Apache POI allows us to set page number at the footer of the sheet. To set page number getFooter() method creates footer and page() and numPages() both are used to set number.
In the following example, we first created a footer and then added page number to it.
Apache POI Page Number Example