summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
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 {