summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-10-18 00:01:33 +0800
committerxuri <xuri.me@gmail.com>2020-10-18 00:01:33 +0800
commit520aa679f34bafbc00626151075b0b123eceb516 (patch)
tree532b53262f78f27351ea9647d9ec09c820b38b6f /sheet.go
parent02530e8c8ad94308458a33ac694e6ac9d3af4c87 (diff)
Fix #706, #713 improve AddPicture performance, fix missing worksheet when rename with same names
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/sheet.go b/sheet.go
index a44e391..aaa72cc 100644
--- a/sheet.go
+++ b/sheet.go
@@ -308,6 +308,9 @@ func (f *File) getActiveSheetID() int {
func (f *File) SetSheetName(oldName, newName string) {
oldName = trimSheetName(oldName)
newName = trimSheetName(newName)
+ if newName == oldName {
+ return
+ }
content := f.workbookReader()
for k, v := range content.Sheets.Sheet {
if v.Name == oldName {