Python 2.7 Openpyxl用户警告 [英] Python 2.7 Openpyxl UserWarning
本文介绍了Python 2.7 Openpyxl用户警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么每次运行代码时都会收到此警告消息? (以下).有可能摆脱它吗?如果是这样,我该怎么办?
Why do I receive this warning message every time I run my code? (below). Is it possible to get rid of it? If so, how do I do that?
我的代码:
from openpyxl import load_workbook
from openpyxl import Workbook
wb = load_workbook('NFL.xlsx', data_only = True)
ws = wb.active
sh = wb["Sheet1"]
ptsDiff = (sh['J127'].value)
print ptsDiff
该代码有效,但我收到此警告消息:
The code works but I get this warning message:
Warning (from warnings module):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openpyxl/reader/worksheet.py", line 320
warn(msg)
UserWarning: Unknown extension is not supported and will be removed
推荐答案
当openpyxl
无法理解/读取扩展名(内置扩展列表openpyxl
当前知道不支持:
This error happens when openpyxl
cannot understand/read an extension (source). Here is the list of built-in extensions openpyxl
currently knows that is doesn't support:
- 条件格式
- 数据验证
- Sparkline集团
- 切片器列表
- 保护范围
- 忽略的错误
- 网络扩展
- 切片器列表
- 时间轴参考
另请参见工作表扩展名列表规范.
这篇关于Python 2.7 Openpyxl用户警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文