diff --git a/pandas/io/excel/_openpyxl.py b/pandas/io/excel/_openpyxl.py index 867d11583dcc0..adc6116fcd774 100644 --- a/pandas/io/excel/_openpyxl.py +++ b/pandas/io/excel/_openpyxl.py @@ -610,8 +610,6 @@ def _convert_cell(self, cell) -> Scalar: def get_sheet_data( self, sheet, file_rows_needed: int | None = None ) -> list[list[Scalar]]: - if self.book.read_only: - sheet.reset_dimensions() data: list[list[Scalar]] = [] last_row_with_data = -1