From 520aa679f34bafbc00626151075b0b123eceb516 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 18 Oct 2020 00:01:33 +0800 Subject: Fix #706, #713 improve AddPicture performance, fix missing worksheet when rename with same names --- sheet.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sheet.go') 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 { -- cgit v1.2.1