diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-05-07 16:12:51 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-05-07 16:12:51 +0800 |
commit | 38ad20efc11c1872c4e62a12617f0300c138b867 (patch) | |
tree | 7190083ed4fa8ddaa1ec3b9ecb260423451f3164 /templates.go | |
parent | bc451a78de32ccde2a4f6d0851ea6e41e45408f1 (diff) |
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>` |