소스 검색

Resolve #667, support shared string table without unique count

xuri 5 년 전
부모
커밋
820a314cfb
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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 {
 			log.Printf("xml decode error: %s", err)
 		}
+		if sharedStrings.UniqueCount == 0 {
+			sharedStrings.UniqueCount = sharedStrings.Count
+		}
 		f.SharedStrings = &sharedStrings
 		for i := range sharedStrings.SI {
 			if sharedStrings.SI[i].T != nil {