I need to read excel files and compare them and produce new outcomes using Python. i have realized that by suing the following codes I can read an excel file:
import xlrd
wb = xlrd.open_workbook('values.xls')
wb.sheet_names()
But i keep getting error of:
Traceback (most recent call last):
File "C:/Python26/Atest/filename.py", line 2, in <module>
wb = xlrd.open_workbook('values.xls')
File "C:\Python26\Lib\site-packages\xlrd\__init__.py", line 366, in open_workbook
formatting_info=formatting_info,
File "C:\Python26\Lib\site-packages\xlrd\__init__.py", line 725, in __init__
f = open(filename, open_mode)
IOError: [Errno 2] No such file or directory: 'values.xls'
I am new to python and I think teh problem might be misplacement of excel sheets in wrong folder. Do they have to be in a specific folder?
thanks
btw I found the above codes regarding reading excel files in python at:
http://scienceoss.com/read-excel-files-from-python/
it might be of help to others