← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #177503]: Passing data through excel sheet to sikuli(in MAC OS)

 

Question #177503 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/177503

Rateesh posted a new comment:
Hi All,

Just an info about my observation on importing the xlrd package:

I needed the xlrd package for Excel parsing in Sikuli. So I downloaded
the latest xlrd package i.e ' xlrd 0.9.2' and put it in a
'C:\SikuliX\libs\' as suggested in above comments (Thanks Raimann!)

Then I tried to open an Excel sheet with the following commands:
import xlrd
book=xlrd.open_workbook(r'C:\Sikuli data\Excel\Test.xls')

But I got the following error:
[error] AttributeError ( 'module' object has no attribute 'open_workbook' ) 

--- (I'm not sure why I got this error since I have imported the xlrd
package)

So as a workaround, I decided to integrate all the names in the xlrd package into my current namespace with the following command:
from xlrd import *

Now there is no need to address the names with module name and the following command solved the problem:
book=open_workbook(r'C:\Sikuli data\Excel\Test.xls')

Hope this is useful!!!


Regards,
Rateesh

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