xlrd cannot read *.xlsx file, prompt xlrd.biffh.XLRDError: Excel xlsx file; not supported

Cause of the error: xlrd only supports .xls files. So xlrd.open_workbook("C:\\date.xls") will report an error.

Solution:

Use openpyxl instead of xlrd to open the .xlsx file: openpyxl.load_workbook("C:\\date.xlsx")

 

Guess you like

Origin blog.csdn.net/zhouzhiwengang/article/details/113105585