官术网_书友最值得收藏!

Catching events

An event is when something happens. That's a rather basic definition but it gives a pretty exact idea of what it means in the context of a Google spreadsheet document.

If a user modifies a cell, deletes a row or column, or even just opens a spreadsheet, all of these events can be caught by a script and we, as script writers, can decide to use these triggers to execute some task.

The online documentation (https://developers.google.com/apps-script/understanding_events) provides an exhaustive list of all the event sources and how to get information from them; I won't reproduce all the descriptions here but I'd like to present some interesting, useful perspectives.

Application examples are numerous: we could interact with range values, colors, font sizes or weights, and even use services that are not actually related to spreadsheets, such as modifying another document, a website's content, or sending an e-mail.

We'll see in Chapter 4, Embedding Scripts in Text Documents that the different Google services can interact very easily and manage some complex workflows automatically, but for now let us concentrate on the basic spreadsheet-related triggers and events (https://developers.google.com/apps-script/understanding_triggers#ActionTriggers).

There are basically two categories of triggers: simple triggers and installable triggers.

The major differences between these triggers are about authority and permissions, so the real question is which trigger is doing what?

主站蜘蛛池模板: 奉贤区| 开江县| 义乌市| 天峻县| 南开区| 略阳县| 奈曼旗| 肥乡县| 中方县| 巫溪县| 仙游县| 牡丹江市| 偏关县| 平陆县| 治多县| 顺昌县| 新晃| 沅陵县| 怀来县| 遂平县| 呼伦贝尔市| 康平县| 柳江县| 竹山县| 若尔盖县| 石楼县| 海林市| 从化市| 福贡县| 乌拉特中旗| 闽侯县| 政和县| 衢州市| 湘乡市| 东明县| 资兴市| 昌宁县| 收藏| 苍山县| 平江县| 丹棱县|