summaryrefslogtreecommitdiff
path: root/excelize.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-04-02 00:41:14 +0800
committerxuri <xuri.me@gmail.com>2020-04-05 13:51:00 +0800
commit0f2a9053246c3ae45e6c7ba911a1fb135664abdf (patch)
tree7428d041bcd06956933003598fa56b0b0c246945 /excelize.go
parent59f6af21a378fdde21422a92b79a7b03bba313d4 (diff)
Performance improvements
Diffstat (limited to 'excelize.go')
-rw-r--r--excelize.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/excelize.go b/excelize.go
index 520cbb7..ae011d9 100644
--- a/excelize.go
+++ b/excelize.go
@@ -234,10 +234,9 @@ func (f *File) addRels(relPath, relType, target, targetMode string) int {
// replaceRelationshipsNameSpaceBytes provides a function to replace
// XML tags to self-closing for compatible Microsoft Office Excel 2007.
func replaceRelationshipsNameSpaceBytes(contentMarshal []byte) []byte {
- var oldXmlns = []byte(` xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">`)
+ var oldXmlns = stringToBytes(` xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">`)
var newXmlns = []byte(templateNamespaceIDMap)
- contentMarshal = bytes.Replace(contentMarshal, oldXmlns, newXmlns, -1)
- return contentMarshal
+ return bytesReplace(contentMarshal, oldXmlns, newXmlns, -1)
}
// UpdateLinkedValue fix linked values within a spreadsheet are not updating in