Opening file in read_only mode results in loss of rows

Issue #724 duplicate
Tejinder Singh created an issue

If I try to open sample file (attached) in read_only mode and try to loop through .rows iterator, it only gives the first row and ignore the rest of the file.

f = open('/home/tejinder/Projects/sales-ingestion/tests/test_files/excel/sales.xlsx', 'rb')

wb = openpyxl.load_workbook(f, read_only=True)

sheet = wb.get_sheet_by_name('Sales Report')

for i in sheet.rows:
print i

(<openpyxl.cell.read_only.ReadOnlyCell object at 0x7f6da17b4110>,)

Comments (2)

  1. Log in to comment