diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-11-16 10:24:45 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-11-16 10:24:45 +0800 |
commit | 96b3e1ea74c2a28842c04891c8d6bd99e2fb3c86 (patch) | |
tree | d11cc870283651c10cc4e3d7d4908c5880ddc0b7 /excelize.go | |
parent | a4ffb4fbfc9048998345e979577dab2a81bf57ff (diff) |
Bugfix: corrupted xlsx after write operation, relate issue #152.
Signed-off-by: Ri Xu <xuri.me@gmail.com>
Diffstat (limited to 'excelize.go')
-rw-r--r-- | excelize.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/excelize.go b/excelize.go index 6b22385..b3abc30 100644 --- a/excelize.go +++ b/excelize.go @@ -135,7 +135,7 @@ func checkSheet(xlsx *xlsxWorksheet) { // Office Excel 2007. 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">` + newXmlns := `<worksheet xr:uid="{00000000-0001-0000-0000-000000000000}" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" mc:Ignorable="x14ac xr xr2 xr3" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">` workbookMarshal = strings.Replace(workbookMarshal, oldXmlns, newXmlns, -1) return workbookMarshal } |