Google Apps Script: Expand Your Skills in Docs and Sheets with JavaScript, Study notes of Computer science

Explore google apps script, a javascript-based language that enhances google docs and sheets functionality. Create custom dialogs, scripts, and add-ons for docs and sheets using this powerful tool. Get started with javascript basics and follow the tasks to create your projects.

Typology: Study notes

2018/2019

Uploaded on 11/12/2019

Satanya
Satanya 🇵🇭

1 document

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Google Apps Script
This is an add-on to the Information Communication Technology (ICT) course. It aims
to broaden learners’ prociency in using productivity apps by introducing basic
programming. These exercises are optional and not graded.
Tip: Turn on Document Outline (found in Tools). Click on a section to jump to it.
Section 1: What is Google Apps Script?
Google Apps Script is a scripting language based on JavaScript that lets you do new
and cool things with Google Apps like Docs, Sheets, and Forms. There's nothing to
install — we give you a code editor right in your browser, and your scripts run on
Google's servers.
Google Apps Script allows you to programmatically create and modify Google Docs,
as well as customize the user interface with new menus, dialog boxes, and sidebars.
Google Apps Script lets you do new and cool things with Google Sheets. You can use
Apps Script to add custom menus, dialogs, and sidebars to Google Sheets. It also
lets you write custom functions for Sheets, as well as integrate Sheets with other
Google services like Calendar, Drive, and Gmail.
Most scripts designed for Google Sheets manipulate arrays to interact with the cells,
rows, and columns in a spreadsheet.
TASK:
1. Conduct surface level research on what you can create with Google Apps
Script, particularly for Google Docs and Google Sheets.
2. Come up with a goal: What do you want to create?
2.a. Google Docs goal (e.g. create a custom dialog that lls out a
GDocs template automatically)
2.b. Google Sheets goal (e.g. create a script that automatically sends
emails containing custom messages)
Section 2: What is Javascript?
Google Apps Script is based upon the highly popular JavaScript programming
language, which is a complicated beast with a very precise and elaborate set of
syntax. To learn Google Apps Script, you’re going to need (at the very least) a basic
understanding of JavaScript.
pf3

Partial preview of the text

Download Google Apps Script: Expand Your Skills in Docs and Sheets with JavaScript and more Study notes Computer science in PDF only on Docsity!

Google Apps Script This is an add-on to the Information Communication Technology (ICT) course. It aims to broaden learners’ proficiency in using productivity apps by introducing basic programming. These exercises are optional and not graded.

Tip: Turn on Document Outline (found in Tools). Click on a section to jump to it.

Section 1: What is Google Apps Script?

Google Apps Script is a scripting language based on JavaScript that lets you do new and cool things with Google Apps like Docs, Sheets, and Forms. There's nothing to install — we give you a code editor right in your browser, and your scripts run on Google's servers.

Google Apps Script allows you to programmatically create and modify Google Docs, as well as customize the user interface with new menus, dialog boxes, and sidebars.

Google Apps Script lets you do new and cool things with Google Sheets. You can use Apps Script to add custom menus, dialogs, and sidebars to Google Sheets. It also lets you write custom functions for Sheets, as well as integrate Sheets with other Google services like Calendar, Drive, and Gmail.

Most scripts designed for Google Sheets manipulate arrays to interact with the cells, rows, and columns in a spreadsheet.

TASK:

  1. Conduct surface level research on what you can create with Google Apps Script, particularly for Google Docs and Google Sheets.
  2. Come up with a goal: What do you want to create? 2.a. Google Docs goal (e.g. create a custom dialog that fills out a GDocs template automatically) 2.b. Google Sheets goal (e.g. create a script that automatically sends emails containing custom messages)

Section 2: What is Javascript?

Google Apps Script is based upon the highly popular JavaScript programming language, which is a complicated beast with a very precise and elaborate set of syntax. To learn Google Apps Script, you’re going to need (at the very least) a basic understanding of JavaScript.

JavaScript is a programming language used to make web pages interactive. It runs on your visitor's computer and doesn't require constant downloads from your website. JavaScript is often used to create polls and quizzes.

JavaScript is an interpreted language, so no special program is required to create usable code. Any plain text editor such as Notepad (one of the Accessories that comes in Windows) is quite satisfactory for being able to write JavaScript. That said, an editor that colorizes the code to make it easier to see what is what makes it easier to find your mistakes.

TASK:

  1. Take CodeAcademy’s Javascript course. Levels 1-3 are required, while 4 and 5 are optional.
  2. Alternatively, take w3schools’s Javascript tutorial. JS Introduction to JS Functions is required, while JS Objects onwards is optional.

Section 3: Google Apps Script for Docs

Google Apps Script allows you to programmatically create and modify Google Docs, as well as customize the user interface with new menus, dialog boxes, and sidebars.

Apps Script can interact with Google Docs in two broad ways: any script can create or modify a document if the script's user has appropriate permissions for the document, and a script can also be bound to a document, which gives the script special abilities to alter the user interface or respond when the document is opened. To create a container-bound script, select Tools > Script editor from within Google Docs.

Read more here.

TASK:

  1. Create your first Google Docs script by following the steps in the Quickstart Guide.
  2. Create the Google Docs script you planned for in Section 1. Additional references can be found here.

Section 4: Google Apps Script for Sheets

Google Apps Script lets you do new and cool things with Google Sheets. You can use Apps Script to add custom menus, dialogs, and sidebars to Google Sheets. It also lets you write custom functions for Sheets, as well as integrate Sheets with other Google services like Calendar, Drive, and Gmail.