嘗試導(dǎo)入excel文件操作,編寫了以下代碼,import xlrdworkbook = xlrd.open_workbook('D:\ben.qin\Desktop\1.xls')worksheets = workbook.sheet_names()print('worksheets is %s' %worksheets)報(bào)出以下錯誤,還請幫忙指點(diǎn)錯誤File "D:/工具/Python/實(shí)例/讀取文件.py", line 9, in <module> workbook = xlrd.open_workbook('D:\ben.qin\Desktop\1.xls') File "D:\工具\(yùn)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'
python導(dǎo)入excel文件,報(bào)錯
慕沐林林
2018-07-16 11:02:20