-2
我正在使用XLRD從Excel文件每30秒讀取一次。不過,我不斷收到來自XLRD錯誤信息......使用XLRD和Python讀取excel文件時出錯
File "C:\Users\Administrator\Desktop\New Folder\final_30sec.py", line 22, in odds
book = open_workbook('excel.xls')
File "C:\Python27\lib\site-packages\xlrd-0.9.0-py2.7.egg\xlrd\__init__.py", line 443, in open_workbook
ragged_rows=ragged_rows,
File "C:\Python27\lib\site-packages\xlrd-0.9.0-py2.7.egg\xlrd\book.py", line 90, in open_workbook_xls
ragged_rows=ragged_rows,
File "C:\Python27\lib\site-packages\xlrd-0.9.0-py2.7.egg\xlrd\book.py", line 619, in biff2_8_load
cd = compdoc.CompDoc(self.filestr, logfile=self.logfile)
File "C:\Python27\lib\site-packages\xlrd-0.9.0-py2.7.egg\xlrd\compdoc.py", line 234, in __init__
_build_family_tree(dirlist, 0, dirlist[0].root_DID) # and stand well back ..
File "C:\Python27\lib\site-packages\xlrd-0.9.0-py2.7.egg\xlrd\compdoc.py", line 71, in _build_family_tree
_build_family_tree(dirlist, parent_DID, dirlist[child_DID].right_DID)
File "C:\Python27\lib\site-packages\xlrd-0.9.0-py2.7.egg\xlrd\compdoc.py", line 68, in _build_family_tree
會有人碰巧知道是什麼原因導致這個錯誤,以及如何avoide嗎......?
什麼錯誤?請顯示完整的回溯和錯誤消息。 – 2013-03-17 19:53:02
如果您獲取該文件的副本並嘗試用xlrd打開副本,錯誤是否仍然發生?什麼過程正在寫入文件?多久? – 2013-03-17 19:57:28
你爲什麼用「xlwt」標記這個問題? – 2013-03-17 20:06:11