I would like to remove/delete an image that I inserted into a google sheet. I used the code:
sheet.insertImage(url,col,row);
to insert the image. But, I want to remove the image later in the code and insert a different image. or not have an image at all.
Try the following:
// Deletes all images in sheet
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Your Tab Name");
var images = sheet.getImages();
images.map(function(img){img.remove();});
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