read only worksheet raises DeprecationWarning

Issue #960 resolved
Scott Stanton
created an issue

A simple access to a cell via a read-only workbook results in a deprecation warning because get_squared_range is still used by ReadOnlyWorksheet._get_cell():

>>> wb=load_workbook('myfile.xlsx', true)
>>> ws=wb['Employee List']
>>> ws['A1']
openpyxl/worksheet/read_only.py:189: DeprecationWarning: Call to deprecated function get_squared_range (Use ws.iter_rows()).
  for row in self.get_squared_range(column, row, column, row):
<ReadOnlyCell 'Employee List'.A1>
>>>

Comments (3)

  1. Log in to comment