diff options
author | Ri Xu <xuri.me@gmail.com> | 2016-12-23 17:47:25 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2016-12-23 17:47:25 +0800 |
commit | b84bfa7eab84a8e065bd5acedeae3d0ba8dc5f8b (patch) | |
tree | 2f60fefa79f398f8d413f693993c083311ee4e24 /excelize.go | |
parent | a08c8eb1aecea4a7d82fc70eb2aa4f886a6ed632 (diff) |
- Update maximum 31 characters allowed in sheet title;
- Fix issue XML tag `headerFooter` and `sheetPr` element self-close errors cause file corruption;
- Fix issue `Section` and `Pane` element order make file corruption in some case;
- Change sheet `rId` calculation method in `/xl/workbook.xml`, fix makes file corruption in some case;
- Compatibility improved: add `xlsxTabColor` struct and some XML element for worksheet
Diffstat (limited to 'excelize.go')
-rw-r--r-- | excelize.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/excelize.go b/excelize.go index 162cb2c..b4f7acc 100644 --- a/excelize.go +++ b/excelize.go @@ -179,14 +179,14 @@ func replaceWorkSheetsRelationshipsNameSpace(workbookMarshal string) string { oldXmlns := `<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">` newXmlns := `<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main">` workbookMarshal = strings.Replace(workbookMarshal, oldXmlns, newXmlns, -1) - workbookMarshal = strings.Replace(workbookMarshal, `></sheetPr>`, ` />`, -1) + workbookMarshal = strings.Replace(workbookMarshal, `></tablePart>`, ` />`, -1) workbookMarshal = strings.Replace(workbookMarshal, `></dimension>`, ` />`, -1) workbookMarshal = strings.Replace(workbookMarshal, `></selection>`, ` />`, -1) workbookMarshal = strings.Replace(workbookMarshal, `></sheetFormatPr>`, ` />`, -1) workbookMarshal = strings.Replace(workbookMarshal, `></printOptions>`, ` />`, -1) workbookMarshal = strings.Replace(workbookMarshal, `></pageSetup>`, ` />`, -1) workbookMarshal = strings.Replace(workbookMarshal, `></pageMargins>`, ` />`, -1) - workbookMarshal = strings.Replace(workbookMarshal, `></headerFooter>`, ` />`, -1) + workbookMarshal = strings.Replace(workbookMarshal, `></mergeCell>`, ` />`, -1) workbookMarshal = strings.Replace(workbookMarshal, `></drawing>`, ` />`, -1) return workbookMarshal } |