# Unprotecting cells in CODE Calc

**URL:** <https://forum.collaboraonline.com/t/unprotecting-cells-in-code-calc/95>\
**Category:** Calc\
**Created:** [December 5, 2020, 9:00am UTC](https://forum.collaboraonline.com/t/unprotecting-cells-in-code-calc/95 "2020-12-05T09:00:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![manu.p](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/manu.p/32/49_2.png) [@manu.p](https://forum.collaboraonline.com/u/manu.p)\
**Post date:** [December 5, 2020, 9:00am UTC](https://forum.collaboraonline.com/t/unprotecting-cells-in-code-calc/95/1 "2020-12-05T09:00:45Z")

</div>

Hi,

For some reason, some cells and/or sheets may have been protected with LO Calc and uploaded in NC.

What is the way to unprotect them using CODE Calc, if any?

Thanks!

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [December 16, 2020, 1:05pm UTC](https://forum.collaboraonline.com/t/unprotecting-cells-in-code-calc/95/2 "2020-12-16T13:05:15Z")

</div>

Hi @manu.p and thanks for the interesting question : )

As far as I know it’s not possible to destroy the protection of a document within Collabora Online (plus this could prove to be quite dangerous) but you can always use Collabora Office or LO by accessing [Tools -\> Protect Sheet or Tools -\> Protect Spreadsheet Structure](https://help.collaboraoffice.com/6.4/en-US/text/scalc/guide/cell_unprotect.html?&DbPAR=CALC&System=UNIX)

 ![Uncheck Protected Cells](https://europe1.discourse-cdn.com/flex013/uploads/collaboraonline/original/1X/88c2edd208ec2fd3543dd1051ea2bbd4b5d33386.png)

---

<div class="post-metadata">

**Author:** ![manu.p](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/manu.p/32/49_2.png) [@manu.p](https://forum.collaboraonline.com/u/manu.p)\
**Post date:** [December 17, 2020, 10:29am UTC](https://forum.collaboraonline.com/t/unprotecting-cells-in-code-calc/95/3 "2020-12-17T10:29:01Z")

</div>

Thanks @pedro.silva, I’m afraid you’re right: there’s no way to [un]protect cells and/or sheets when using CODE.

So the only way to do this, knowing the password (because I’m not speaking of any other way to bypass the protection…), is to download the file, unprotect the sheet and do what you’ve got to do on the unprotected cells, protect back the sheet as it was before and in the end upload the file back in the cloud.

I would suggest activating the “[Temporary files lock](https://apps.nextcloud.com/apps/files_lock)” application in order to avoid any change on the file while it is “out of the cloud”.

Protecting and unprotecting a calc sheet under CODE would be an interesting feature since these protections are mainly intended to avoid different users to alter some contents when they do not have to, in a sharing use of calc files… which is one of the main purpose of CODE, if I’m not wrong. 🤔
