DeprecationWarning when opening in read only

Issue #990 duplicate
Marco Santoni
created an issue

An unexpected DeprecationWarning is risen when opening a workbook in read-only mode:

from openpyxl import load_workbook

wb = load_workbook("foo.xlsx", read_only=True)
ws = wb['Sheet1']
ws.cell(row=10, column=5)

It raises the following warning:

C:\Users\...\.conda\envs\...\lib\site-packages\openpyxl\worksheet\ DeprecationWarning: Call to deprecated function get_squared_range (Use ws.iter_rows()).
  for row in self.get_squared_range(column, row, column, row):

The above was run on Windows 10 using Anaconda. Openpyxl version 2.5.0

Comments (1)

  1. Log in to comment