← Back to team overview

sikuli-driver team mailing list archive

[Question #180377]: Error while opening an excel file.

 

New question #180377 on Sikuli:
https://answers.launchpad.net/sikuli/+question/180377

I have downloaded xlrd package  and placed in to SIKULI X/LIB folder.
Book1.xls is my xls file present on D: drive.

below is my script:

import xlrd

wb = xlrd.open_workbook("D:\\Book1.xls") 

when i execute this scrip i am getting following error message:

[error] Stopped
[error] An error occurs at line 3
[error] Error message: Traceback (most recent call last):
 File "C:\Users\amrutada\AppData\Local\Temp\sikuli-tmp5913927366881109490.py", line 3, in 
 wb = xlrd.open_workbook("D:\\Book1.xls") 
File ".\xlrd\__init__.py", line 429, in open_workbook
 biff_version = bk.getbof(XL_WORKBOOK_GLOBALS)
 File ".\xlrd\__init__.py", line 1545, in getbof
 bof_error('Expected BOF record; found %r' % self.mem[savpos:savpos+8])
 File ".\xlrd\__init__.py", line 1539, in bof_error
 raise XLRDError('Unsupported format, or corrupt file: ' + msg)
xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found 'PK\x03\x04\x14\x00\x06\x00'


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.