问题
I'm building a dashboard in Google Spreadsheets and want to include some images to be shown when certain rows are hidden/shown. Is this possible? I've used insertImage to insert the image but I can't find a way to delete or hide the image (hiding the rows does not affect images).
Any ideas?
回答1:
There is no straightforward way of removing an image from the Apps Script API. Even if you delete a row, the image will still remain.
You should raise a request for this feature in the Issue Tracker ( http://code.google.com/p/google-apps-script-issues/issues/list ) .
EDIT: Looks like there is already a very old issue for this https://code.google.com/p/google-apps-script-issues/issues/detail?id=64 . Along with a workaround mentioned there
回答2:
Why don't you directly use the spreadsheet native function =Image(URL,section), it will be show or hide with the cells
来源:https://stackoverflow.com/questions/15665401/how-to-hide-images-in-google-spreadsheets-with-google-apps-script