summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sheet.go b/sheet.go
index bbe84c2..20bf7c7 100644
--- a/sheet.go
+++ b/sheet.go
@@ -1421,7 +1421,7 @@ func (f *File) GetDefinedName() []DefinedName {
RefersTo: dn.Data,
Scope: "Workbook",
}
- if dn.LocalSheetID != nil {
+ if dn.LocalSheetID != nil && *dn.LocalSheetID >= 0 {
definedName.Scope = f.getSheetNameByID(*dn.LocalSheetID + 1)
}
definedNames = append(definedNames, definedName)