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 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