From b1b056e0ebe0f05bae16023bf4972bda226de40c Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Fri, 2 Mar 2018 10:19:40 +0800 Subject: Handle special shared string table file name `xl/SharedStrings.xml`, relate issue #188 --- rows.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rows.go') diff --git a/rows.go b/rows.go index a6b0738..405717c 100644 --- a/rows.go +++ b/rows.go @@ -149,7 +149,11 @@ func (f *File) GetRowHeight(sheet string, row int) float64 { func (f *File) sharedStringsReader() *xlsxSST { if f.SharedStrings == nil { var sharedStrings xlsxSST - xml.Unmarshal([]byte(f.readXML("xl/sharedStrings.xml")), &sharedStrings) + ss := f.readXML("xl/sharedStrings.xml") + if ss == "" { + ss = f.readXML("xl/SharedStrings.xml") + } + xml.Unmarshal([]byte(ss), &sharedStrings) f.SharedStrings = &sharedStrings } return f.SharedStrings -- cgit v1.2.1