DeprecationWarning错误处理

python3.6遇到问题,源代码中这一句出现告警 ----sheet = wb.get_sheet_by_name("Sheet1")

按照提示修改为wb["Sheet"]解决

告警信息如下:

D:\python_t1\excel>python excel.py
excel.py:6: DeprecationWarning: Call to deprecated function get_sheet_by_name (Use wb[sheetname]).
sheet = wb.get_sheet_by_name("Sheet1")
序号
姓名
年龄
电话

posted on 2018-04-13 21:46  棠巴巴  阅读(13431)  评论(0编辑  收藏  举报

导航