Skip to content

Commit 3783d1d

Browse files
committed
This closes qax-os#782, fix unmerge all cells cause corrupted file
1 parent 23c73ab commit 3783d1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

merge.go

+3
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ func (f *File) UnmergeCell(sheet string, hcell, vcell string) error {
148148
}
149149
ws.MergeCells.Cells = ws.MergeCells.Cells[:i]
150150
ws.MergeCells.Count = len(ws.MergeCells.Cells)
151+
if ws.MergeCells.Count == 0 {
152+
ws.MergeCells = nil
153+
}
151154
return nil
152155
}
153156

0 commit comments

Comments
 (0)