python – 这是什么意思? DeprecationWarning:调用已弃用的函数get_sheet_by_name(使用wb [sheetname])
我通过使用import openpyxl将xlsx表导入到Python 3.6中,现在我尝试通过执行以下操作来访问Cell对象(见下文),但我立即得到一条错误消息,我不知道这意味着什么?:
Warning (from warnings module):
File "__main__", line 1
DeprecationWarning: Call to deprecated function get_sheet_by_name (Use wb[sheetname]).
这是我的代码:
import openpyxl
wb = openpyxl.load_workbook('c:\\users\\user1\\AppData\\Local\\Programs\\Python\\Python36-32\\example.xlsx')
sheet = wb.get_sheet_by_name('Sheet1')