summaryrefslogtreecommitdiff
path: root/rows.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2018-03-02 10:19:40 +0800
committerRi Xu <xuri.me@gmail.com>2018-03-02 10:19:40 +0800
commitb1b056e0ebe0f05bae16023bf4972bda226de40c (patch)
treeb7a46e3d2aafda236c47bbbfef68e263624f889c /rows.go
parent9d7b94d760126aa51485d7d864b1b98a8720017c (diff)
Handle special shared string table file name `xl/SharedStrings.xml`, relate issue #188
Diffstat (limited to 'rows.go')
-rw-r--r--rows.go6
1 files changed, 5 insertions, 1 deletions
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