Issue opening Excel

Asked by Q17

Hi,

I am using Sikuli 1.1.1 and I have followed the instruction from this post: https://answers.launchpad.net/sikuli/+faq/2208

My code as follow:

import xlrd

book = xlrd.open_workbook('Excel.sikuli/myfile.xls')
worksheet = book.sheet_by_name('Sheet1')

After I click on the Build button from the IDE it disappear for a second then reappears again and there is no error message.

Could someone please tell me how to resolve this?
Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

what should happen with your code?

at the end of your script, worksheet is a sheet object, whose contents can now be accessed according to the docs of xldd.

Revision history for this message
Q17 (squery) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
Q17 (squery) said :
#3

I have added more code like:
print book.nsheets
print book.sheet_names()

Thanks is working.