Python: get the value of a checkbox in Excel

妖精的绣舞 提交于 2020-03-27 06:57:17

问题


I have a checkbox called "check1" in an Excel file and I would like to take its value with Python.

I tried:

 wb = load_workbook(filename=myFile, read_only=True, data_only=True)
 title, coord = next(wb.defined_names['check1'].destinations)

 valueCheck1= wb[title][coord].value

with openpyxl but it does not work.

The error is:

KeyError: 'No definition called check1'

even if I have properly defined it

Any suggestion?

来源:https://stackoverflow.com/questions/43974629/python-get-the-value-of-a-checkbox-in-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!