-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Cannot read XLSX files with xlrd version 2.0.0 #38410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
as the erorr message indicates xlrd no longer supports this, you can downgrade. |
jreback unfortunately didn't really address the issue here, which is that pd.read_excel("file.xlsx") is supposed to use openpyxl for files that are identified as .xlsx but in this instance it is incorrectly trying to use xlrd. this looks like it really is a bug in pd.read_excel for which a workaround is to specify engine="openpyxl" in the call. adding that parameter solved this issue for me. try this (though it should not be necessary it might fix it for you):
from: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_excel.html engine : str, default None
Changed in version 1.2.0: The engine xlrd now only supports old-style .xls files. When engine=None, the following logic will be used to determine the engine:
|
@keiv-fly you would have to open with a reproducible example and version info |
sorry @hansgilead |
A reproducible example with the latest stable pandas and xlrd:
file.xlsx is a new completely empty excel sheet. Error:
pip freeze: The most important:
All output:
Output of the
|
Since |
Code that fails with xlrd==2.0.0:
pd.read_excel("file.xlsx")
raises the error:
XLRDError: Excel xlsx file; not supported
The documentation for xlrd==2.0.0 says that it does not support any other files other than "xls"
xlrd updated their version today on 2020-12-11
The text was updated successfully, but these errors were encountered: