Automate Google Sheets An Introduction to Google Apps

  • Slides: 20
Download presentation
Automate Google Sheets: An Introduction to Google Apps Script FPPT. com

Automate Google Sheets: An Introduction to Google Apps Script FPPT. com

 • A powerful tool

• A powerful tool

Getting Started with Google Apps Script There are two main types of scripts you

Getting Started with Google Apps Script There are two main types of scripts you can use with Google Apps: standalone and bound scripts.

1. Standalone scripts are not attached to any particular app in your Google account.

1. Standalone scripts are not attached to any particular app in your Google account. Instead, think of them as macros that perform system-wide functions.

A standalone script could search your Google Drive for all items with the name

A standalone script could search your Google Drive for all items with the name ‘untitled’ (the default name Google gives to files when the name isn’t specified), for example, as a handy way to keep your Google Drive clutterfree. You'll see standalone scripts alongside your other Google Drive files, and each file contains Java. Script for your particular function.

2. Bound scripts extend the functionality of a certain file in one of your

2. Bound scripts extend the functionality of a certain file in one of your Google apps. They perform specific actions directly to that particular file. For example, you could create a script bound to a specific Google Sheet that checks for and removes duplicate rows.

example: Removing Duplicate Rows in a Spreadsheet Goal This example how to avoid duplicates

example: Removing Duplicate Rows in a Spreadsheet Goal This example how to avoid duplicates when you want to automate the process of copying data in G Suite and specifically how to remove duplicate rows in spreadsheet data. Google Apps Script lets you copy email attachments from Gmail to a collection in Google Docs, sync spreadsheet data with a list page in Google Sites or with Google Calendar or with your contact list. The example shown below can be used to avoid duplicates in each of those cases.

Time to Complete Approximately 5 minutes. Prerequisites Before beginning this tutorial, you should feel

Time to Complete Approximately 5 minutes. Prerequisites Before beginning this tutorial, you should feel comfortable using the Script Editor and have experience using the most basic Spreadsheet functions.

Running a simple example Open a new spreadsheet in Google Docs or use an

Running a simple example Open a new spreadsheet in Google Docs or use an existing spreadsheet containing duplicates. if the spreadsheet is empty, add a few rows of data (for example, a list of contacts, parts inventory, etc. ) and duplicate some of them.

Choose the menu Tools > Script Editor.

Choose the menu Tools > Script Editor.

Copy and paste the following script:

Copy and paste the following script:

Before After running the function

Before After running the function

If we change the age of to 20 ﺯﻳﻨﺐ ﻋﺒﺎﺱ After running the function

If we change the age of to 20 ﺯﻳﻨﺐ ﻋﺒﺎﺱ After running the function