Skip to content
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

Merged
merged 8 commits into from
May 10, 2024
Merged

#242 Support footer and header in PoiUtil #300

merged 8 commits into from
May 10, 2024

Conversation

SoltauFintel
Copy link
Member

@SoltauFintel SoltauFintel commented Mar 4, 2024

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 using builder.withSheetCreator(new ...).

@SoltauFintel SoltauFintel changed the title Support footer and header in PoiUtil #242 Support footer and header in PoiUtil Mar 4, 2024
Copy link
Member

@leonate leonate left a 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.

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: creater -> creator

Copy link
Member Author

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 {
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@SoltauFintel
Copy link
Member Author

Development finished. I'm still waiting for the nightly test results.

@SoltauFintel SoltauFintel added this to the 3.1.0 milestone Mar 11, 2024
@SoltauFintel SoltauFintel merged commit 6dec5d3 into master May 10, 2024
2 checks passed
@SoltauFintel SoltauFintel deleted the feature-242 branch May 10, 2024 09:07
Copy link
Member

@leonate leonate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants