Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

xlsx is not supported by xlrd anymore #75

@longlevan

Description

@longlevan

oemof-solph: v0.4.x - excel_reader
OS: Windows 10
Python: 3.9.1

If engine is not specified for xls = pd.ExcelFile(filename) the following error occurs:

raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
xlrd.biffh.XLRDError: Excel xlsx file; not supported

This happens as excel file was created for the extension xlsx which is not supported anymore by xlrd. The problem will be solved by installing openpyxl and specifying it as engine for parsing xlsx using pandas xls = pd.ExcelFile(filename,engine='openpyxl').

Another error occurs when running dispatch.py is that when parsed data are NaN (i.e. np.nan), if de["active"] return true. For avoiding that np.nan should be removed or check to be sure de["active"] is not NaN: if de["active"] and (not pd.isnull(de["active"]))

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions