bengbengbalabalabeng opened a new pull request, #916:
URL: https://github.com/apache/fesod/pull/916
<!--
Thanks very much for contributing to Apache Fesod (Incubating)! Please make
sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
Closed: #ISSUE
Related: #ISSUE
-->
## Purpose of the pull request
Closed: #913
<!-- Describe the purpose of this pull request. For example: Closed:
#ISSUE-->
## What's changed?
Added excel sheet freeze pane support.
Use Case:
- Freeze columns 1-2 (A-B) and row 1 in the sheet.
```java
// for bean annotation
@FreezePane(colSplit = 2, rowSplit = 1)
public class Model { ... }
FesodSheet.write(file, Model.class)
.sheet()
.doWrite(data);
// for write-handler
FesodSheet.write(file)
.registerWriteHandler(new SheetFreezePaneStrategy(2, 1, 2, 1))
.sheet()
.doWrite(data);
```
- Freeze rows 1–3 and columns 1–2 (A-B) in the sheet. The right pane starts
displaying from column 6 (F) by default, and the bottom pane starts displaying
from row 11 by default.
```java
// for bean annotation
@FreezePane(colSplit = 2, rowSplit = 3, leftmostColumn = 5, topRow = 10)
public class Model { ... }
FesodSheet.write(file, Model.class)
.sheet()
.doWrite(data);
// for write-handler
FesodSheet.write(file)
.registerWriteHandler(new SheetFreezePaneStrategy(2, 3, 5, 10))
.sheet()
.doWrite(data);
```
<!--- Describe the change below, including rationale and design decisions -->
## Checklist
- [x] I have read the [Contributor
Guide](https://fesod.apache.org/community/contribution/).
- [x] I have written the necessary doc or comment.
- [x] I have added the necessary unit tests and all cases have passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]