Browse Source

Resolve #667, support shared string table without unique count

xuri 5 years ago
parent
commit
820a314cfb
1 changed files with 3 additions and 0 deletions
  1. 3 0
      rows.go

+ 3 - 0
rows.go

@@ -286,6 +286,9 @@ func (f *File) sharedStringsReader() *xlsxSST {
 			Decode(&sharedStrings); err != nil && err != io.EOF {
 			Decode(&sharedStrings); err != nil && err != io.EOF {
 			log.Printf("xml decode error: %s", err)
 			log.Printf("xml decode error: %s", err)
 		}
 		}
+		if sharedStrings.UniqueCount == 0 {
+			sharedStrings.UniqueCount = sharedStrings.Count
+		}
 		f.SharedStrings = &sharedStrings
 		f.SharedStrings = &sharedStrings
 		for i := range sharedStrings.SI {
 		for i := range sharedStrings.SI {
 			if sharedStrings.SI[i].T != nil {
 			if sharedStrings.SI[i].T != nil {