I am trying to find a way to protect a Google Sheets spreadsheet document from being modified by the owner. In other words, I want to make the cells of my Google Sheets spreadsheet to be read-only.
How can I create a script, assigned to a button, that would accomplish this?
Specifically, I need two features:
1) Make the sheet read-only.
2) Modify a specific cell, then make the sheet read-only again.
Find the file or folder in Google Drive, Google Docs, Google Sheets, or Google Slides. Open or select the file or folder. Select Restricted. Click Done.
Go to the Run menu, choose Run function > makeFileReadyOnly . Accept the permissions and your file will restricted from editing by anyone including yourself.
Protecting Your Data Google Sheets allows you to that by following the steps: Click on “Data” > “Protected Sheets and Ranges.” Then choose between “Range” to protect a specific range of cells or “Sheet” to protect the entire spreadsheet.
I'm not sure if you mean you, as the owner of the sheet, are unable to edit it or if everyone except you is unable to edit it.
Either way, go to the Data menu and click 'Protected sheets and ranges'. In the sidebar, click 'add a range', add a description if you like, choose 'range' from 'range/sheet', add the cell reference you wish to protect and:
If you want others to be unable to edit it: Change permission drop down to 'Only me'
If you want to be unable to edit it: Change permissions to 'Edit with warning' (This is the best I can think of, because as the owner of the sheet, you cannot prevent yourself from editing cells, but this will alert you if you try change a cell you wish to protect)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With