@@ -20,7 +20,7 @@ import (
20
20
"strconv"
21
21
"strings"
22
22
23
- "github.com/mohae/ deepcopy"
23
+ "github.com/tiendc/go- deepcopy"
24
24
)
25
25
26
26
// duplicateHelperFunc defines functions to duplicate helper.
@@ -653,7 +653,7 @@ func (f *File) DuplicateRowTo(sheet string, row, row2 int) error {
653
653
654
654
for i , r := range ws .SheetData .Row {
655
655
if r .R == row {
656
- rowCopy = deepcopy .Copy (ws .SheetData .Row [i ]).( xlsxRow )
656
+ deepcopy .Copy (& rowCopy , ws .SheetData .Row [i ])
657
657
ok = true
658
658
break
659
659
}
@@ -729,7 +729,8 @@ func (f *File) duplicateConditionalFormat(ws *xlsxWorksheet, sheet string, row,
729
729
}
730
730
}
731
731
if len (SQRef ) > 0 {
732
- cfCopy := deepcopy .Copy (* cf ).(xlsxConditionalFormatting )
732
+ var cfCopy xlsxConditionalFormatting
733
+ deepcopy .Copy (& cfCopy , * cf )
733
734
cfCopy .SQRef = strings .Join (SQRef , " " )
734
735
cfs = append (cfs , & cfCopy )
735
736
}
@@ -759,7 +760,8 @@ func (f *File) duplicateDataValidations(ws *xlsxWorksheet, sheet string, row, ro
759
760
}
760
761
}
761
762
if len (SQRef ) > 0 {
762
- dvCopy := deepcopy .Copy (* dv ).(xlsxDataValidation )
763
+ var dvCopy xlsxDataValidation
764
+ deepcopy .Copy (& dvCopy , * dv )
763
765
dvCopy .Sqref = strings .Join (SQRef , " " )
764
766
dvs = append (dvs , & dvCopy )
765
767
}
0 commit comments