python读取excel报错Excel xlsx file; not supported解决方法

问题描述:

python读取excel文件时,报Excel xlsx file; not supported错误。
在这里插入图片描述


问题根源:

xlrd1.2.0之后的版本不支持xlsx格式,只支持xls格式


解决方法:

``1、卸载高版本的xlrd,安装1.2.0老版本的xlrd。

pip uninstall xlrd
pip install xlrd==1.2.0

卸载
2、将excel文件从xlsx另存为xls。(推荐

猜你喜欢

转载自blog.csdn.net/liangxiaoyan0426/article/details/130882898