Python读取excel xlrd读取xlsx报错:Excel xlsx file; not supported


Python读取excel xlrd读取xlsx报错:Excel xlsx file; not supported
 

问题描述

Python 使用 xlrd 读取excel xlsx 文件的时候报错
 
发生异常: XLRDError (note: full exception trace is shown but execution is paused at: <module>)
Excel xlsx file; not supported
File "C:\Users\XQ-Garson\Desktop\Python\gz\run_positionbyxls.py", line 68, in <module> (Current frame) data = xlrd.open_workbook(fileName) # 打开xls文件
 
Python读取excel

原因分析

python 插件 xlrd 在因为 1.2.0后面得版本 取消 了对 xlsx 文件得读取,那么我们把版本号换到以前得可以读取得版本就可以了!

对,就是这么简单!

解决方案

卸载 现在的 xlrd 重新安装 xlrd 指定版本位 1.2.0

PowerShell 全选
# 卸载 xlrd
pip uninstall xlrd
# 安装 1.2.0 版本的 xlrd
pip install xlrd==1.2.0

 

 
 
版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
管理员
上一篇:Python暂停程序执行
下一篇:selenium爬虫被检测到 该如何破
评论列表

发表评论

评论内容
昵称:
关联文章

Python读取excel xlrd读取xlsxExcel xlsx file; not supported
.NETCore 运行项目:Could not load file or assembly ***
.NET Core中使用编码GB2312‘GB2312‘ is not a supported encoding name 解决方案
Python多线程中试用wmi
.Net启动程序:It was not possible to find any compatible framework version
Python使用html解析包Requests-html运行py文件没问题,Pyinstaller打包exe后运行
Python读取文件 发生异常: UnicodeDecodeError 'gbk' codec can't decode byte
Python windows服务: Installing service ALicense Error installing service: 拒绝访问
NPOI 读取EXCEL(2003,2007)并转换为DataTable
插入代码页面
支付宝获取用户信息时,提示 对不起,访问出了 E004:AUTH_REDIRECT_URL_NOT_IN_WHITE
Visual Studio (VS) 使用Gulp ReferenceError: primordials is not defined
C#HTTP请求RestSharp.RestClient发起https请求
.NET Core Winform 打开窗体设计器
WCF中常见的:The content type text
Python Windows服务
Python windows服务: 1053:服务没有及时响应启动或控制请求
EFCore链接数据库
Python windows服务: 1063 StartServiceCtrlDispatcher 服务进程无法连接到服务控制器上
PC端编译 Empty block statement no-empty

联系我们
联系电话:15090125178(微信同号)
电子邮箱:garson_zhang@163.com
站长微信二维码
微信二维码