diff options
author | xuri <xuri.me@gmail.com> | 2020-10-19 23:55:54 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-10-19 23:55:54 +0800 |
commit | 4834a058aa3f953a7010704f2358633ae6e1d492 (patch) | |
tree | 08fa4cd30047ebee2a6f5e84a0ac8ea2796e27f3 /sheet.go | |
parent | 520aa679f34bafbc00626151075b0b123eceb516 (diff) |
This closes #714 and closes #715, fix wrong worksheet index returned by NewSheet in some case, fix panic on formatted value with no built-in number format ID
Diffstat (limited to 'sheet.go')
-rw-r--r-- | sheet.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -37,8 +37,9 @@ import ( // appending the new sheet. func (f *File) NewSheet(name string) int { // Check if the worksheet already exists - if f.GetSheetIndex(name) != -1 { - return f.SheetCount + index := f.GetSheetIndex(name) + if index != -1 { + return index } f.DeleteSheet(name) f.SheetCount++ |