-3
import xlrd
book = xlrd.open_workbook("File_1.xls")
sheet = book.sheet_by_index(0)
print sheet.row_values(0)[0]
我試圖讀取存儲在系統(臺式機)Excel文件中的有關Excel工作表只有一張紙,當我跑它給了一個錯誤代碼: -從系統讀取Excel文件時出錯?
Traceback (most recent call last):
File "C:/Python26/readingExlfiles.py", line 2, in <module>
book = xlrd.open_workbook("File_1.xls")
File "C:\Python26\Lib\site-packages\xlrd\__init__.py", line 449, in open_workbook
ragged_rows=ragged_rows,
File "C:\Python26\Lib\site-packages\xlrd\__init__.py", line 941, in biff2_8_load
f = open(filename, open_mode)
IOError: [Errno 2] No such file or directory: 'File_1.xls'
請幫我與之相同。