From ddeed48fc19e814e1ec2c04580108f7b865cf181 Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Tue, 20 Dec 2016 20:46:19 +0800 Subject: - Fix issue background image and table missing after save; - Update test template for this fix --- sheet.go | 2 ++ test/Workbook1.xlsx | Bin 18395 -> 21643 bytes xmlWorksheet.go | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/sheet.go b/sheet.go index 36488d5..088a651 100644 --- a/sheet.go +++ b/sheet.go @@ -125,6 +125,8 @@ func replaceRelationshipsNameSpace(workbookMarshal string) string { func replaceRelationshipsID(workbookMarshal string) string { rids := strings.Replace(workbookMarshal, ``, ``, -1) rids = strings.Replace(rids, ``, ``, -1) + rids = strings.Replace(rids, ``, ``, -1) + rids = strings.Replace(rids, ``, ``, -1) return strings.Replace(rids, ` +// ... +// +// +// +// +// +type xlsxTableParts struct { + Count int `xml:"count,attr"` + TableParts []xlsxTablePart `xml:"tablePart"` +} + +// xlsxTablePart directly maps the tablePart element in the namespace +// http://schemas.openxmlformats.org/spreadsheetml/2006/main +type xlsxTablePart struct { + RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"` +} + +// xlsxPicture directly maps the picture element in the namespace +// http://schemas.openxmlformats.org/spreadsheetml/2006/main - +// Background sheet image. +// Example: +// +// +// +type xlsxPicture struct { + RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"` // Relationship Id pointing to the image part. +} -- cgit v1.2.1