top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

unable to read combo boxes in excel by xlrd package in python

+1 vote
586 views

I want to read the combo box in excel by using "xlrd" but in the output it is showing empty message, its not reading the combo box can u guys help me how to read the combo box in excel by "xlrd"

code written like this

workbook = xlrd.open_workbook('path of the file')
worksheet = workbook.sheet_by_name('sheetname')
TargetSystem = worksheet.cell_value(4, 2)
posted Sep 27, 2013 by Seema Siddique

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

It depends on what kind of combo-box it is. The Excel-native combo-box sucks (no auto-completion, no multi-select, etc.), and so it's possible a Visual Basic widget was used instead. That would leave the cell contents blank when read, as above.

You will need to retrieve the value from the combo-box object directly somehow.

answer Sep 27, 2013 by Sheetal Chauhan
If it's an Active-X ListBox or ComboBox, there's probably be a CellLink defined. This will be the cell you need to read with xlrd to get the value.
Similar Questions
0 votes

Im required to import ha certain dll called 'NHunspell.dll' which is used for Spell Checking purposes. I am using Python for the software. Although I checked out several websites to properly use ctypes, I have been unable to load the dll properly.

When I use this code.

 from ctypes import *
 hunspell = cdll.LoadLibrary['Hunspellx64.dll']

I get an error

 hunspell = cdll.LoadLibrary['Hunspellx64.dll']
 TypeError: 'instancemethod' object has no attribute '__getitem__'

I guess it might a problem with the structure of the dll. But I have no idea how to import the dll properly.

+1 vote

I want to install path.py in my Python 3.4 environment on a Centos 5 box. My /usr/local/bin/ contains:

easy_install-3.4 
python3.4  
etc. 

We are behind a proxy server and I tried this:

# /usr/local/bin/easy_install-3.4 path.py 

Searching for path.py 
Reading https://pypi.python.org/simple/path.py/ 
Download error on https://pypi.python.org/simple/path.py/: hostname '172.29.68.1  
' doesn't match either of 'www.python.org', 'python.org', 'pypi.python.org',  
'docs.python.org', 'testpypi.python.org', 'bugs.python.org', 'wiki.python.org',  
'hg.python.org', 'mail.python.org', 'packaging.python.org', 'pythonhosted.org',  
'www.pythonhosted.org', 'test.pythonhosted.org', 'us.pycon.org', 'id.python.org' --  
Some packages may not be found! 

Couldn't find index page for 'path.py' (maybe misspelled?), Am I best to use pip or easy_install? also if easy_install, how can I fix the above error?

+1 vote

What is the best way to distribute a private, pure python, Python 3 project that needs several modules (some available on pypi but some private and used by several separate projects) in order to run?

I'd like to include everything that my project needs to run in a single package. The best way to do this seems to be to be to create symlinks to the source code of the "3rd party" modules I need and create a setup.py file that includes them in its "packages" list. Is this what other people do?

But even more ideally, I'd like to package my script and its dependencies in a single zip file that can be executed by python directly. I see several declarations that this is possible online, but I can't find a simple recipe for converting a script and its dependencies into this kind of distribution. Could someone give me a
pointer to a description of "the right way to do it".

I'm making life harder for myself by using python 3 (PyInstaller still only supports Python 2) and by the fact that I can't release some of the necessary code publicly.

...