summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2019-09-16 01:17:35 +0800
committerxuri <xuri.me@gmail.com>2019-09-16 01:17:35 +0800
commit8922f659788187afa6d0a5d3248e999c2c1bb846 (patch)
tree29b2aae2028eaedc448daef08a5670d6f3ca4604 /cell.go
parenta3ee098ab60d9528a0d6b7a7c475ea8ff7ebaba5 (diff)
Combine functions:
workBookRelsWriter, drawingRelsWriter into relsWriter; drawingRelsReader, workbookRelsReader, workSheetRelsReader into relsReader; addDrawingRelationships, addSheetRelationships into addRels
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cell.go b/cell.go
index e897379..1da46aa 100644
--- a/cell.go
+++ b/cell.go
@@ -378,7 +378,9 @@ func (f *File) SetCellHyperLink(sheet, axis, link, linkType string) error {
linkData = xlsxHyperlink{
Ref: axis,
}
- rID := f.addSheetRelationships(sheet, SourceRelationshipHyperLink, link, linkType)
+ 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)
case "Location":
linkData = xlsxHyperlink{