Detecting changes from an add-on sidebar or dialogYou'll find various techniques for this around this site, but they are all based on polling. This means that the client app running in the browser occasionally polls the Server and asks it to send back data about sheet being worked on. There is no simple way to have the Server contact the Client when it detects a change. That's where Ephemeral exchange (efx), a cross platform cache, comes in. LibraryTo standardize and tailor access for Sheets push notification, you can use this library, cSheetEfx which contains all you'll need in one place. 1X33G3XxC-ulHVaS1gDTsqT3g3-BQ_YaWk1_jhOe-UhZwAo_n40IdW1S1
GithubAll the code mentioned here is on github. These pages will walk you through getting this set up.
Demo videoFor more like this, see Google Apps Scripts snippets. Why not join our forum, follow the blog or follow me on twitter to ensure you get updates when they are available. |
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Ephemeral Exchange >
Pushing changes from Google Sheets server to client
Subpages (7):
Getting started with Ephemeral Exchange for push notification
Implementing fisheye projection with D3 for google sheets add-on
Initializing the server
Proof of concept Sheets navigation with D3 fisheye distortion and ephemeral exchange
Reacting to push notifications
Setting up onChange trigger
Testing upublished add-on
Comments