0

I've created a Google Sheets spreadsheet that is shared with anonymous users. All users have Edit permission because I want them to contribute data to the spreadsheet.

The problem is that some users are just plain trolls and tries to spam the sheet with useless information. I have tried using data validation, google scripts and other features to restrict them as much access as possible. However, they can still create a drawing and add a textbox or image to it.

As there are no granular Edit permission controls, I'm not sure how I can set this up properly. I could grant them Comment-only access, but some users just have no idea how to use a simple spreadsheet.

So I'm just wondering if it's possible to lock down certain functions in the spreadsheet? Or is there some sort of google script I can use that scans the spreadsheet for drawings and deletes them automatically?

1

Unfortunately, this is not possible to achieve in Google Sheets (eg. to lock down certain functions like "inserting of drawings" etc.)

0

Nevermind, I found my own solution. You can remove drawings using Google Script.

Just use the following and trigger on edit:

// https://stackoverflow.com/questions/31184459/how-do-you-delete-an-image-from-a-google-sheet
// https://stackoverflow.com/questions/52602177/deleting-images-in-google-sheet-via-script-error

function removeImages() {

  // Deletes all images in sheet
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName("Enter your sheet name here");
  var images = sheet.getImages();
  images.map(function(img){img.remove();});

} 
  • 1
    Could you elaborate on it a bit so that those googling for this in the future can understand what you did? – jonsca Feb 28 at 0:00

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.