How do I use jQuery in a script attached to a Google Spreadsheet? The Google Libraries page seems to make it simple but apparently I misunderstand the execution environment for Libraries, calling google.load() in the script fails.
So what is the right way to do this? I can imagine ideas like calls on UrlFetchApp.fetch() but that doesn't seem like the right way.
(I know I get confused with the various Google App environments, so to be clear: I'm talking about a script saved in the 'script editor' under Tools on the menu for a Google Docs Spreadsheet.)
It is possible to use jQuery from Google Apps Script, but only through the HtmlService, and only in client-side scripts. It's mentioned in the HtmlService Best Practices documentation.
Some examples you'll find here on StackOverflow:
- Browser Pop up in Google Apps Script
- How to make a tab panel using HTML Service
- jQuery onblur with Google Apps Script
- Populate jQuery autocomplete list using value array from Google Spreadsheet
- Use HtmlService, CSS & jQuery to overlay images in Google Apps Script WebApp
- How do I run Server-side functions using HtmlService
- Using DataTables plug-in in jQuery