If I share access to a database I made in Google Drive, is there a way to allow others to input data but not change or alter my database format?


Google Drive sharing settings don't control the database format. You should look to at the app used to edit your database.


I presume you're talking about a Sheet. Yes—highlight the cells you don't want them to edit, right click and lock them. Then share the Sheet, allowing the collaborators to edit.

  • Actually, Google Sheets sheet/range protection can't prevent that editors change cell formats. – Rubén Aug 10 '18 at 14:35

Absolutely, I use this code.

function onEdit(e) {
  var adminEmail = 'ADMINUSER@gmail.com';
  var user = Session.getActiveUser().getEmail();
  var activeRange = e.range;
  var oldValue = e.oldValue;
  if (oldValue == undefined) {
   oldValue = ""; 
  if (adminEmail !== user){
    Browser.msgBox('WARNING', 'Please contact the Administrator to edit this sheet. You can contact the Administrator by emailing them at "'+adminEmail+'".', Browser.Buttons.OK);
  } else {
    /* code goes here */
  • onEdit only works on Google Sheets spredsheets. – Rubén May 26 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.