From f0cb29cf6668ab96992b1e48278d9f5b1f9e4976 Mon Sep 17 00:00:00 2001 From: xuri Date: Sat, 5 Mar 2022 14:48:34 +0800 Subject: This closes #1162, improve the compatibility with alternate content Preserve alternate content in the workbook, worksheet, and drawingML --- drawing.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drawing.go') diff --git a/drawing.go b/drawing.go index 0bc7900..5582bb4 100644 --- a/drawing.go +++ b/drawing.go @@ -1160,6 +1160,12 @@ func (f *File) drawingParser(path string) (*xlsxWsDr, int) { log.Printf("xml decode error: %s", err) } content.R = decodeWsDr.R + for _, v := range decodeWsDr.AlternateContent { + content.AlternateContent = append(content.AlternateContent, &xlsxAlternateContent{ + Content: v.Content, + XMLNSMC: SourceRelationshipCompatibility.Value, + }) + } for _, v := range decodeWsDr.OneCellAnchor { content.OneCellAnchor = append(content.OneCellAnchor, &xdrCellAnchor{ EditAs: v.EditAs, -- cgit v1.2.1