I would like to be able to set page numbers on the footer of an excel spreadsheet (and therefore to appear on a printout).
Code would have to be similar to:
var sheet = workbook.createSheet(sheet_title);//this works
var pageHeader = sheet.sheet.getHeader();//this works
pageHeader.setCenter("Test of a header);//this works
var pageFooter = sheet.sheet.getFooter();//this works
//the reccomended way according to apache poi is to use HeaderFooter.page() and HeaderFooter.numPages() but these are not exposed
pageFooter.setCenter("Page " + HeaderFooter.page() + " of " + HeaderFooter.numPages());//does not work of course
//so I have this palceholder at the moment
pageFooter.setCenter("Print date:" + new Date());//this works
I would like to be able to set page numbers on the footer of an excel spreadsheet (and therefore to appear on a printout). Code would have to be similar to: var sheet = workbook.createSheet(sheet_title);//this works var pageHeader = sheet.sheet.getHeader();//this works pageHeader.setCenter("Test of a header);//this works var pageFooter = sheet.sheet.getFooter();//this works //the reccomended way according to apache poi is to use HeaderFooter.page() and HeaderFooter.numPages() but these are not exposed pageFooter.setCenter("Page " + HeaderFooter.page() + " of " + HeaderFooter.numPages());//does not work of course //so I have this palceholder at the moment pageFooter.setCenter("Print date:" + new Date());//this works
Can we expose more methods?