summaryrefslogtreecommitdiff
path: root/templates.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2018-05-07 16:44:02 +0800
committerGitHub <noreply@github.com>2018-05-07 16:44:02 +0800
commit038e34250f3ff827d85434b65cbba86a95724318 (patch)
treea4c441c4e2b7f3cdb3d34dcc80ae8e2011736b3b /templates.go
parent3ca180f09c4a602068d890bd22e83ac48a83f5cf (diff)
parentd04be7b33da84a3f2f768ee4f0de7c49ab69279e (diff)
Merge pull request #220 from lunny/lunny/refactor
save bytes on memory instead of string
Diffstat (limited to 'templates.go')
-rw-r--r--templates.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates.go b/templates.go
index b5f4f8c..d3f82ee 100644
--- a/templates.go
+++ b/templates.go
@@ -6,6 +6,10 @@ package excelize
// XMLHeader define an XML declaration can also contain a standalone declaration.
const XMLHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
+var (
+ XMLHeaderByte = []byte(XMLHeader)
+)
+
const templateDocpropsApp = `<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><TotalTime>0</TotalTime><Application>Golang Excelize</Application></Properties>`
const templateContentTypes = `<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/></Types>`