ws.columns has exception if the workbook is loaded with read_only=True

Issue #534 resolved
Steven Niu
created an issue
In [47]: wb = load_workbook('t2.xlsx', read_only=True)

In [48]: ws = wb.get_sheet_by_name(wb.sheetnames[0])

In [49]: ws.rows
Out[49]: <generator object get_squared_range at 0x0000000015D4DF30>
In [50]: ws.columns
Traceback (most recent call last):

  File "<ipython-input-50-17e09f4be84e>", line 1, in <module>
    ws.columns

  File "C:\Users\Steven\Anaconda\lib\site-packages\openpyxl\worksheet\read_only.py", line 189, in columns
    return super(IterableWorksheet, self).columns

NameError: global name 'IterableWorksheet' is not defined

Comments (3)

  1. Log in to comment