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:
- Pyexcel Error: xlrd.biffh.XLRDError: Excel xlsx file; not supported
- Python openpyxl excel open zipfile error resolution: zipfile.BadZipFile: File is not a zip file
- PIP Install Mysqlclient error C1083: Cannot open include file: ‘mysql.h‘: No such file or directory
- ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
- [Solved] Import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- Tensorflow import Error: ImportError: libcuda.so.1: cannot open shared object file: No such file or dire
- Error reading file by pandas pandas.errors.EmptyDataError: no columns to parse from file
- [Solved] Python Read bam File Error: &&OSError: no BGZF EOF marker; file may be truncated
- [Solved] Python project runs the open() function error: FileNotFoundError: [Errno 2] No such file or directory
- [Solved] Python Pandas Read Error: OSError: initializing from file failed
- Chromdriver Install error: File “C:\python37\lib\site-packages\selenium\webdriver\common\service.py”, line 76, in start stdin=PIPE) File…
- RuntimeError: Non RGB images are not supported [How to Fix]
- [Solved] RuntimeError: cuda runtime error (801) : operation not supported at
- [Solved] ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE
- [Solved] AttributeError WriteOnlyWorksheet object has no attribute cell
- Windows10 DOTA_devkit Error: TypeError: ‘>=‘ not supported between instances of ‘NoneType‘ and ‘str‘
- Python + Requests +Excel+Jenkins interface automation
- [Solved] Odrive gui Error: Do not use the development server in a productioun and supported version of the Socket
- [Solved] ValueError: row index was 65536, not allowed by .xls format
- How to Fix Python reading large local file memory error