diff options
author | xuri <xuri.me@gmail.com> | 2018-05-07 16:44:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 16:44:02 +0800 |
commit | 038e34250f3ff827d85434b65cbba86a95724318 (patch) | |
tree | a4c441c4e2b7f3cdb3d34dcc80ae8e2011736b3b /templates.go | |
parent | 3ca180f09c4a602068d890bd22e83ac48a83f5cf (diff) | |
parent | d04be7b33da84a3f2f768ee4f0de7c49ab69279e (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.go | 4 |
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>` |