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


S

somesh g

Hi..there

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)
 
Ad

Advertisements

N

Neil Cerutti

Hi..there

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)

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.
 
Ad

Advertisements

N

Neil Cerutti

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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top