Issue opening Excel

Asked by Jp17 on 2017-07-06

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:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2017-07-06
Last query:
2017-07-06
Last reply:
2017-07-06
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.

Jp17 (jlin17) said : #2

Thanks RaiMan, that solved my question.

Jp17 (jlin17) said : #3

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

Thanks is working.