getting 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_workbook biff_version = bk.getbof(XL_WORKBOOK_GLOBALS) File "C:\Python25\Lib\site-pack

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Dec 8 02:48:53 EST 2008


En Fri, 05 Dec 2008 02:31:01 -0200, pk sahoo <prasannaksahoo at gmail.com>  
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




More information about the Python-list mailing list