The function expects an excel file. It cannot read a plain text file. You would need to figure out a way to convert the text file data into an excel format and save it to a new file first.
The proper way to handle this is to make your data processing functions expect a defined format. Then, you write importer functions for various types of files that convert the data in each file to the defined format. That way, you can support various file formats and reuse your processing functions on all of them. -- http://mail.python.org/mailman/listinfo/python-list