From 7dbf88f221f278075d4ff9e153b21236d0826c33 Mon Sep 17 00:00:00 2001 From: xuri Date: Thu, 29 Jul 2021 00:03:57 +0800 Subject: This closes #971, closes #972 and closes #974 - Escape XML character in the drop list - Fix incorrect character count limit in the drop list - Fix Excel time parse issue in some case - Fix custom number format month parse issue in some case - Fix corrupted file generated caused by concurrency adding pictures --- sheet.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sheet.go') diff --git a/sheet.go b/sheet.go index 7a1fff3..756eb81 100644 --- a/sheet.go +++ b/sheet.go @@ -72,12 +72,13 @@ func (f *File) contentTypesReader() *xlsxTypes { if f.ContentTypes == nil { f.ContentTypes = new(xlsxTypes) + f.ContentTypes.Lock() + defer f.ContentTypes.Unlock() if err = f.xmlNewDecoder(bytes.NewReader(namespaceStrictToTransitional(f.readXML("[Content_Types].xml")))). Decode(f.ContentTypes); err != nil && err != io.EOF { log.Printf("xml decode error: %s", err) } } - return f.ContentTypes } -- cgit v1.2.1