尝试导入excel文件操作,编写了以下代码,import xlrdworkbook = xlrd.open_workbook('D:\ben.qin\Desktop\1.xls')worksheets = workbook.sheet_names()print('worksheets is %s' %worksheets)报出以下错误,还请帮忙指点错误File "D:/工具/Python/实例/读取文件.py", line 9, in <module> workbook = xlrd.open_workbook('D:\ben.qin\Desktop\1.xls') File "D:\工具\Anaconda3\lib\site-packages\xlrd\__init__.py", line 394, in open_workbook f = open(filename, "rb")OSError: [Errno 22] Invalid argument: 'D:\x08en.qin\\Desktop\x01.xls'
- 2 回答
- 0 关注
- 1426 浏览
添加回答
举报
0/150
提交
取消