尝试导入excel文件操作,编写了以下代码,
import xlrd
workbook = 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
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'