[Solved] Cannot open .xlsx file, xlrd.biffh.XLRDError: Excel xlsx file; not supported

The reason is that xlrd has recently been updated to version 2.0.1 and only supports .xls files. So it x1 = xlrd.open_workbook("data.xlsx")will report an error.

You can install the old version of xlrd and run it in cmd:
it is recommended to uninstall the new version directly and download the old version of xlrd

pip uninstall xlrd
pip install xlrd==1.2.0

You can also use openpyxl instead of xlrd to open .xlsx files:

df=pandas.read_excel(‘data.xlsx’,engine=’openpyxl’)

If you are willing to be mediocre, please shoot yourself!

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *