0

In one of our project website, we are about to use Google spread sheet for our clients to enter some information and do some spread sheet work. So using Google APIs We can create spread sheet on our website and allow users to enter details in it. But my question is that is it possible to lock rows and columns so users can only enter data in the field they are allowed to modify?

For example,

--------------------------
| Car Rent   |           |
| Total Gas  |           |
| Insurance  |           |
| Commission |    1%     |
--------------------------

Lets say this is our basic template for spread sheet for all of our users. The can enter Car rent, total gas and insurance value but they are not allowed to modify anything else, including row headers or any other empty cell outside this box. So is there anyway to lock it for users in spread sheet? Can anyone point me to guide or api details?

Thanks

Amit Pandya
  • 361
  • 1
  • 3
  • 19
  • This concept falls under [Protecting a sheet or range](https://support.google.com/docs/answer/1218656?co=GENIE.Platform%3DDesktop&hl=en). Users won't be able to edit a certain range of your spreadsheet data if you don't allow them to. Follow that guide in the link. If you want to do this programatically, check the [Class Protection](https://developers.google.com/apps-script/reference/spreadsheet/protection) in Apps Script. – ReyAnthonyRenacia Jan 21 '18 at 10:46
  • 1
    Thanks @noogui for helping me! – Amit Pandya Jan 22 '18 at 14:05
  • related: https://stackoverflow.com/questions/70611665/google-sheet-api-executing-addprotectedrangerequest/70611882?noredirect=1#comment124824879_70611882 – ses Jan 06 '22 at 19:37

0 Answers0