-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#242 Support footer and header in PoiUtil #300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a nice change. Besides the spelling "Creater" and missing tests I have no other remarks.
jxls-site/docs/builder.md
Outdated
@@ -244,6 +244,15 @@ One use case could be performing POI operations, e.g. for grouping. | |||
If you want to change the way how running variables are accessed, call `withRunVarAccess((name, data) -> your code)`. | |||
The PublicContext.getRunVar() method is especially used to save loop variables. However, it is often the case that there is no entry for the key at all. If the map implementation reacts allergically to non-existent keys, you can change the behavior with withRunVarAccess(). | |||
|
|||
## Sheet creater |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: creater -> creator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,14 @@ | |||
package org.jxls.builder; | |||
|
|||
public interface SheetCreater { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change it to SheetCreator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
header/footer only if differentOddEven is true.
Development finished. I'm still waiting for the nightly test results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! 👍
First I've tried to extend PoiUtil to copy more page settings.
Then I've added an interface so that JXLS users can change/extend the copy action.
But then I've found
XSSFWorkbook.cloneSheet()
which can do the whole job! So I've changed my interface to SheetCreator.You can call
((PoiSheetCreator) builder.getSheetCreator()).setCloneSheet(false)
if you don't want to use cloneSheet(). Or JXLS users can set their own create sheet action usingbuilder.withSheetCreator(new ...)
.