-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
allow to remove MergeCell #528
Conversation
Codecov Report
@@ Coverage Diff @@
## master #528 +/- ##
==========================================
- Coverage 96.49% 96.47% -0.02%
==========================================
Files 28 28
Lines 5699 5729 +30
==========================================
+ Hits 5499 5527 +28
- Misses 109 110 +1
- Partials 91 92 +1
Continue to review full report at Codecov.
|
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.
Hi @zxdvd, thanks for your PR. I've left some comments.
cellmerged.go
Outdated
@@ -33,6 +33,24 @@ func (f *File) GetMergeCells(sheet string) ([]MergeCell, error) { | |||
return mergeCells, err | |||
} | |||
|
|||
// UnmergeCell unmerge a MergeCell. | |||
func (f *File) UnmergeCell(sheet string, m MergeCell) error { |
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.
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.
Ok. I didn't find the MergeCell function in cell.go. Maybe the MergeCell
will be moved into cellmerged.go in the future or move UnmergeCell
to cell.go?
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.
Yeah right, the MergeCell
should be moved into cellmerged.go
.
PR Details
This PR exposes a method to remove a MergeCell.
Description
I needs to flat all mergecells in excel. I've tried to get the area of a mergecell and use
SetCellValue
to set each cell in this area but it didn't work.I think a
RemoveMergeCell
is needed.Related Issue
#527
Motivation and Context
How Has This Been Tested
Types of changes
Checklist