summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2019-12-23 00:07:40 +0800
committerxuri <xuri.me@gmail.com>2019-12-23 00:07:40 +0800
commit4e4a5b9b3e052d1694442515492792fb1aa74c5a (patch)
treeebb0746cc3a26e50ed921f6f25cb295be6c3c417 /cell.go
parentae2865d9237cfd27d7bc4fbef3870b3361597be8 (diff)
Improve compatibility, fix workbook's rels ID calc error
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cell.go b/cell.go
index ad4bcdb..e59a659 100644
--- a/cell.go
+++ b/cell.go
@@ -395,7 +395,7 @@ func (f *File) SetCellHyperLink(sheet, axis, link, linkType string) error {
linkData = xlsxHyperlink{
Ref: axis,
}
- sheetPath, _ := f.sheetMap[trimSheetName(sheet)]
+ sheetPath := f.sheetMap[trimSheetName(sheet)]
sheetRels := "xl/worksheets/_rels/" + strings.TrimPrefix(sheetPath, "xl/worksheets/") + ".rels"
rID := f.addRels(sheetRels, SourceRelationshipHyperLink, link, linkType)
linkData.RID = "rId" + strconv.Itoa(rID)