From cbe919fdf6c00733513494680b89171b8b1b41a1 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 4 Aug 2019 20:24:59 +0800 Subject: New feature: sparkline supported --- excelize.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'excelize.go') diff --git a/excelize.go b/excelize.go index c7eff10..6d014a0 100644 --- a/excelize.go +++ b/excelize.go @@ -181,11 +181,21 @@ func checkSheet(xlsx *xlsxWorksheet) { // Office Excel 2007. func replaceWorkSheetsRelationshipsNameSpaceBytes(workbookMarshal []byte) []byte { var oldXmlns = []byte(``) - var newXmlns = []byte(``) + var newXmlns = []byte(``) workbookMarshal = bytes.Replace(workbookMarshal, oldXmlns, newXmlns, -1) return workbookMarshal } +// replaceStyleRelationshipsNameSpaceBytes provides a function to replace +// xl/styles.xml XML tags to self-closing for compatible Microsoft Office +// Excel 2007. +func replaceStyleRelationshipsNameSpaceBytes(contentMarshal []byte) []byte { + var oldXmlns = []byte(``) + var newXmlns = []byte(``) + contentMarshal = bytes.Replace(contentMarshal, oldXmlns, newXmlns, -1) + return contentMarshal +} + // UpdateLinkedValue fix linked values within a spreadsheet are not updating in // Office Excel 2007 and 2010. This function will be remove value tag when met a // cell have a linked value. Reference -- cgit v1.2.1