summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-08-19 13:37:15 +0800
committerRi Xu <xuri.me@gmail.com>2017-08-19 13:37:15 +0800
commit1ec2661dda1ef16f58b2a3d614b11a2bcd0a2f2f (patch)
treeb06360066f67463f4eb57461b98226c26821b8b6 /sheet.go
parent77af25295ece8863326c99652d615f82385286b2 (diff)
Bugfix: deep copy issue with function `CopySheet()`, relate PR #108.
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/sheet.go b/sheet.go
index 80d7cd6..ac0969f 100644
--- a/sheet.go
+++ b/sheet.go
@@ -435,7 +435,8 @@ func (f *File) CopySheet(from, to int) error {
// target worksheet index.
func (f *File) copySheet(from, to int) {
sheet := f.workSheetReader("sheet" + strconv.Itoa(from))
- worksheet := *sheet
+ worksheet := xlsxWorksheet{}
+ deepCopy(&worksheet, &sheet)
path := "xl/worksheets/sheet" + strconv.Itoa(to) + ".xml"
if len(worksheet.SheetViews.SheetView) > 0 {
worksheet.SheetViews.SheetView[0].TabSelected = false