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

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?

主站蜘蛛池模板: 蚌埠市| 辰溪县| 莫力| 铜山县| 平昌县| 乌拉特后旗| 武平县| 兰西县| 涿州市| 夏邑县| 台中市| 广西| 青州市| 波密县| 灵川县| 呼玛县| 新营市| 赣榆县| 黔东| 浙江省| 鲁甸县| 阿克陶县| 库伦旗| 麦盖提县| 金山区| 额敏县| 璧山县| 棋牌| 海原县| 广德县| 托克托县| 饶阳县| 辽阳市| 邢台县| 莎车县| 小金县| 高安市| 东光县| 伊宁县| 平度市| 陵川县|