Skip to content

Commit e109e14

Browse files
FIX - handling shared string CELL_ISST (BrtCellIsst record) #15
1 parent 49c5e4f commit e109e14

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyxlsb2/worksheet.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ def rows(self, sparse=True):
8484
row = Row(self, row_num)
8585
elif rectype == rt.CELL_ISST:
8686
if rec.v is not None and rec.c is not None:
87-
row._add_cell(rec.c, rec.v, rec.f, rec.style)
87+
if 0 <= rec.v < len(self.workbook.stringtable._strings):
88+
value = self.workbook.get_shared_string(rec.v)
89+
else:
90+
value = rec.v
91+
row._add_cell(rec.c, value, rec.f, rec.style)
8892

8993
elif rectype >= rt.CELL_BLANK and rectype <= rt.FMLA_ERROR:
9094
if rec.v is not None and rec.c is not None:

0 commit comments

Comments
 (0)