How to run custom function by hovering or clicking on cell in google spreadsheet?

只谈情不闲聊 提交于 2019-12-08 05:44:49

问题


I need help to make a table which will have a cells as product thumbnails and by hovering or clicking on this small image, I want to show the pop up with big image of product.

(Right now it works as hyperlink, but it is not enough)

I know we have a few ways how to run function right now:

  • from a custom spreadsheet function
  • from a trigger (from spreadsheet like on open, on edit or on form submit, or Time driven)
  • from a custom menu (which must be created by e.g. on open)
  • from a custom user interface (which must be created by e.g. on open)
  • from a drawing or chart
  • from the script editor

Is there any way how we can trigger event like hover or click on cell in table?

I have a few ideas right now :

  • Some how place big image in comment or note in cell.
  • Make a custom function which will return image/chart/drawing as a value and apply function for this image/chart/drawing. But seems we should have much more easy way to do it =)

I know this is a similar question as: This and This but they are old and google has made an API update since December 11, 2014.


回答1:


  • Add an Image ( Insert > Image ) to your sheet.
  • Resize and Move it to fit your needs.
  • Click the drop-down symbol in the upper right corner of the image.
  • Select 'Assign Script'
  • Enter the name of the script you wish to run.


来源:https://stackoverflow.com/questions/37064117/how-to-run-custom-function-by-hovering-or-clicking-on-cell-in-google-spreadsheet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!