diff options
author | xuri <xuri.me@gmail.com> | 2020-07-18 15:15:16 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-07-18 15:15:16 +0800 |
commit | c922c32fb7571d3d40d3244e5635142bc390a3db (patch) | |
tree | 12c2a1541458963caca5f7714d7861c42637d4c6 /picture.go | |
parent | 820a314cfbcaa4d32401b0b6c67bf65f064483ec (diff) |
support parse and generate XML element namespace dynamic, fix #651
Diffstat (limited to 'picture.go')
-rw-r--r-- | picture.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -168,6 +168,7 @@ func (f *File) AddPictureFromBytes(sheet, cell, format, name, extension string, return err } f.addContentTypePart(drawingID, "drawings") + f.addSheetNameSpace(sheet, SourceRelationship) return err } @@ -279,11 +280,11 @@ func (f *File) addDrawingPicture(sheet, drawingXML, cell, file string, width, he pic.NvPicPr.CNvPr.Name = "Picture " + strconv.Itoa(cNvPrID) if hyperlinkRID != 0 { pic.NvPicPr.CNvPr.HlinkClick = &xlsxHlinkClick{ - R: SourceRelationship, + R: SourceRelationship.Value, RID: "rId" + strconv.Itoa(hyperlinkRID), } } - pic.BlipFill.Blip.R = SourceRelationship + pic.BlipFill.Blip.R = SourceRelationship.Value pic.BlipFill.Blip.Embed = "rId" + strconv.Itoa(rID) pic.SpPr.PrstGeom.Prst = "rect" |