Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tooltip image on cell hover, Google Spreadsheet

I'm currently working on a Google Spreadsheet that has to include a bunch of image references.

What I want to achieve is this: When you hover over a cell an image appear (like a tooltip).

I found this widget on the Google Developers, but when I add the code to my spreadsheet nothing happens.

Does any of you guys know how to do something like this? Any hints on how to go about this is highly appreciated!

like image 941
timkl Avatar asked Jun 10 '26 10:06

timkl


1 Answers

Displaying a User Interface from a Spreadsheet

As an alternative to deploying your user interface as a standalone web app, you can create a container-bound script from a Spreadsheet, and display the user interface from the Spreadsheet. To do this, find your doGet function and simply replace the call to

 return app;

with the following:

 var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
 spreadsheet.show(app);

where app is the variable name for the UiInstance object you are returning. Additionally, when you display the user interface from a Spreadsheet, the function does not have to be named doGet. You could instead call it something like displayMyUi, and then call that function directly to display the user interface in your Spreadsheet. When a user interface is displayed from a Spreadsheet, the script runs as the user who's accessing the Spreadsheet.

e.g.

 function doGet() {
 var app = UiApp.createApplication();
 // The very first Google Doodle!
 app.add(app.createImage("http://www.google.com/logos/googleburn.jpg"));

 var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
 spreadsheet.show(app);
 }
like image 187
Guest Avatar answered Jun 13 '26 00:06

Guest