mercredi 23 juin 2021

How to read value associated with Checkbox using docx module in Python

I am attempting to read the table cell from word document and extracting the value associated with marked checkbox.

Please refer the attached screenshot of the cell. Doc cell

sho = table.cell(0,1)
for checkbox in sho:
 print('checkbox value is %s' %checkbox.get(qn('w:val))) 

Above code is not working.




Aucun commentaire:

Enregistrer un commentaire