En Fri, 05 Dec 2008 02:31:01 -0200, pk sahoo <[EMAIL PROTECTED]> escribió:

hallo everybody,
when i am running the following command

import xlrd
book=xlrd.open_workbook("C:\\a.xls")

i am getting the following error..


*Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python25\Lib\site-packages\xlrd\__init__.py", line 370, in
open_workb
ook
    biff_version = bk.getbof(XL_WORKBOOK_GLOBALS)
  File "C:\Python25\Lib\site-packages\xlrd\__init__.py", line 1323, in
getbof
    raise XLRDError('Expected BOF record; found 0x%04x' % opcode)
xlrd.biffh.XLRDError: Expected BOF record; found 0x3f3c*

Looks like your a.xls file is not an Excel file (one of the formats supported by xlrd).
As 0x3f3c corresponds to the characters '<?' you probably have an XML file.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to