问题
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