@@ -20,7 +20,7 @@ import (
2020 "strconv"
2121 "strings"
2222
23- "github.com/mohae/ deepcopy"
23+ "github.com/tiendc/go- deepcopy"
2424)
2525
2626// duplicateHelperFunc defines functions to duplicate helper.
@@ -653,7 +653,7 @@ func (f *File) DuplicateRowTo(sheet string, row, row2 int) error {
653653
654654 for i , r := range ws .SheetData .Row {
655655 if r .R == row {
656- rowCopy = deepcopy .Copy (ws .SheetData .Row [i ]).( xlsxRow )
656+ deepcopy .Copy (& rowCopy , ws .SheetData .Row [i ])
657657 ok = true
658658 break
659659 }
@@ -729,7 +729,8 @@ func (f *File) duplicateConditionalFormat(ws *xlsxWorksheet, sheet string, row,
729729 }
730730 }
731731 if len (SQRef ) > 0 {
732- cfCopy := deepcopy .Copy (* cf ).(xlsxConditionalFormatting )
732+ var cfCopy xlsxConditionalFormatting
733+ deepcopy .Copy (& cfCopy , * cf )
733734 cfCopy .SQRef = strings .Join (SQRef , " " )
734735 cfs = append (cfs , & cfCopy )
735736 }
@@ -759,7 +760,8 @@ func (f *File) duplicateDataValidations(ws *xlsxWorksheet, sheet string, row, ro
759760 }
760761 }
761762 if len (SQRef ) > 0 {
762- dvCopy := deepcopy .Copy (* dv ).(xlsxDataValidation )
763+ var dvCopy xlsxDataValidation
764+ deepcopy .Copy (& dvCopy , * dv )
763765 dvCopy .Sqref = strings .Join (SQRef , " " )
764766 dvs = append (dvs , & dvCopy )
765767 }
0 commit comments