Change the Protection Status for Locked for a special column

  Kiến thức lập trình

I would like to use Openpyxl to change the Protection status for Locked for the special column.

I have tried to use the following code

for col in ['K']:
    for cell in ws[col]:
        cell.protection = Protection(locked=False)

But the below error pops up:
NameError: name ‘Protection’ is not defined

LEAVE A COMMENT