I have an excel file with a drop-down list and I would like to access its current value from python.
In vba the code is really simple :
Sheets("name_of_my_sheet").name_of_my_list.value
I looked for an equivalent in xlrd but couldn’t find one.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I got my answer. The list the drop-down box is created at run time in vba so you can’t “read” its value from the xls.
The solution is to write in VBA an on change method that will actually write the value to the cell under the box.
Then each time you save your sheet and want to read it from python you can access the current value.