From 4e4a5b9b3e052d1694442515492792fb1aa74c5a Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 23 Dec 2019 00:07:40 +0800 Subject: Improve compatibility, fix workbook's rels ID calc error --- cell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cell.go') 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) -- cgit v1.2.1