Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to unprotect a sheet? #1032

Closed
trymelz opened this issue Feb 12, 2019 · 4 comments
Closed

how to unprotect a sheet? #1032

trymelz opened this issue Feb 12, 2019 · 4 comments

Comments

@trymelz
Copy link

trymelz commented Feb 12, 2019

Really need this feature. I searched the pull requests, it was there, but still could not find it in the released version...

@abhi3700
Copy link

For this, you might have to write the function module in VBA and then fetch using Python code (in .py file).
VBA protect reference: https://www.excel-easy.com/vba/examples/protect-macro.html
Run VBA code using python: #134

Try this.

@fzumstein
Copy link
Member

fzumstein commented Feb 12, 2019

You can use .api to fall back to pywin32 and do what is not covered natively in xlwings: mysheet.api.Unprotect()

@trymelz
Copy link
Author

trymelz commented Feb 13, 2019

Awesome! Thanks for your quick response. It works!

@fzumstein
Copy link
Member

it was a bit late, when I wrote the answer, so please drop _inner (I've updated the solution now above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants