AttributeError: 'ReadOnlyWorksheet' object has no attribute 'iter_cols'

Issue #889 invalid
Zachary Samenfeld created an issue

My code:

import openpyxl as op

workbook = op.load_workbook(filename=xlsx_file, read_only=True)
for worksheet in workbook:
    for cell in worksheet['A']:
        print(cell.value)

When I run this code I get:
"AttributeError: 'ReadOnlyWorksheet' object has no attribute 'iter_cols'"
Although it's documented here:
http://openpyxl.readthedocs.io/en/default/tutorial.html#accessing-many-cells
That this should be valid..

Comments (2)

  1. Log in to comment