From efcf599dfe2ec25f10c4d55513a5648addfe989b Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 28 Sep 2022 00:04:17 +0800 Subject: This closes #1360, closes #1361 - Fix default number format parse issue with a long string of digits - Fix creating a sheet with an empty name cause a corrupted file - The `GetCellStyle` function no longer return master cell style of the merge cell range - Using the specialized name in variables and functions --- sheet.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sheet.go') diff --git a/sheet.go b/sheet.go index ee4f667..fe24b18 100644 --- a/sheet.go +++ b/sheet.go @@ -39,6 +39,9 @@ import ( // `Sheet1` will be created. func (f *File) NewSheet(sheet string) int { // Check if the worksheet already exists + if trimSheetName(sheet) == "" { + return -1 + } index := f.GetSheetIndex(sheet) if index != -1 { return index -- cgit v1.2.1