简体   繁体   中英

Java POI excel paging sheets

I'm working on a excel workbook, using Java POI .

I have several sheets and I need to add Pagination to 4 of them. The problem is :

How I am suppose to attribute a global pagination to these sheets ?

sheet.getFooter().setRight(HeaderFooter.page()); only works for ONE sheet.

Cordially.

The Excel file format mandates that a footer is always per sheet, even in Excel itself you have to set up the footer for each sheet separately as far as I know. So the Apache POI API reflects this and you need to set the footer for each sheet.

Naturally you can write a helper function where you pass in the Sheet object to not have to code it 4 times here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM