Unable to load workbook with data_only=False without optional metadata
Hello,
I am working with workbooks generated by 3rd party libraries, that omit some optional attributes in metadata in order to reduce the final file size.
Unfortunately, openpyxl is not able to read those files in the default mode (with formulas), and fails with the following error message:
File ..\venv\lib\site-packages\openpyxl\reader\excel.py:346, in load_workbook(filename, read_only, keep_vba, data_only, keep_links, rich_text)
316 """Open the given filename and return the workbook
317
318 :param filename: the path to open or a file-like object
(...)
342
343 """
344 reader = ExcelReader(filename, read_only, keep_vba,
345 data_only, keep_links, rich_text)
--> 346 reader.read()
347 return reader.wb
File ..\venv\lib\site-packages\openpyxl\reader\excel.py:301, in ExcelReader.read(self)
299 apply_stylesheet(self.archive, self.wb)
300 action = "read worksheets"
--> 301 self.read_worksheets()
302 action = "assign names"
303 self.parser.assign_names()
File ..\venv\lib\site-packages\openpyxl\reader\excel.py:237, in ExcelReader.read_worksheets(self)
...
--> 197 for idx, c in enumerate(coordinate):
198 if c in digits:
199 break
TypeError: 'NoneType' object is not iterable
I am enclosing one of the files so you can review the metadata and recreate the issue. openpyxl_issue.xlsx