Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54887 > unrolled thread
| Started by | somesh g <someshg2@gmail.com> |
|---|---|
| First post | 2013-09-27 07:36 -0700 |
| Last post | 2013-09-27 15:26 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.python
unable to read combo boxes in excel by xlrd package in python somesh g <someshg2@gmail.com> - 2013-09-27 07:36 -0700
Re: unable to read combo boxes in excel by xlrd package in python Neil Cerutti <neilc@norwich.edu> - 2013-09-27 15:04 +0000
Re: unable to read combo boxes in excel by xlrd package in python Neil Cerutti <neilc@norwich.edu> - 2013-09-27 15:26 +0000
| From | somesh g <someshg2@gmail.com> |
|---|---|
| Date | 2013-09-27 07:36 -0700 |
| Subject | unable to read combo boxes in excel by xlrd package in python |
| Message-ID | <6e38b68a-0fa7-47c4-8e36-308b5b89bbdd@googlegroups.com> |
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)
[toc] | [next] | [standalone]
| From | Neil Cerutti <neilc@norwich.edu> |
|---|---|
| Date | 2013-09-27 15:04 +0000 |
| Message-ID | <ball3mFq38U1@mid.individual.net> |
| In reply to | #54887 |
On 2013-09-27, somesh g <someshg2@gmail.com> wrote:
> 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.
--
Neil Cerutti
[toc] | [prev] | [next] | [standalone]
| From | Neil Cerutti <neilc@norwich.edu> |
|---|---|
| Date | 2013-09-27 15:26 +0000 |
| Message-ID | <balmcvF1518U1@mid.individual.net> |
| In reply to | #54889 |
On 2013-09-27, Neil Cerutti <neilc@norwich.edu> wrote:
> On 2013-09-27, somesh g <someshg2@gmail.com> wrote:
>> 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.
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.
--
Neil Cerutti
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web