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!
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);
}
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