Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Google Apps Script

You're reading from   Learning Google Apps Script Customize and automate Google Applications using Apps Script

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher
ISBN-13 9781785882517
Length 232 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
 Ganapathy Ganapathy
Author Profile Icon Ganapathy
Ganapathy
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Learning Google Apps Script
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Introducing Google Apps Scripts FREE CHAPTER 2. Creating Basic Elements 3. Parsing and Sending E-mails 4. Creating Interactive Forms 5. Creating Google Calendar and Drive Applications 6. Creating Feed Reader and Translator Applications 7. Creating Interactive Webpages 8. Building a Workflow Application 9. More Tips and Tricks and Creating an Add-on Index

The DriveApp class


This class allows you to create, search, and modify files and folders in your Drive.

For reference documentation on the DriveApp class, refer to the website: https://developers.google.com/apps-script/reference/drive/drive-app?hl=en.

Creating customized PDF files

Imagine that you need to create customized PDF files from the Sheet or external data. We can create PDF files from the HTML template. You simply need to format column headers and put some sample data in a new Sheet (AddressBook) as shown in the following screenshot:

Create the createPdfs function in the Code.gs file as listed here:

function createPdfs(){
  
  // 0 based column numbers
  const NAME = 0;
  const TITLE = 1;
  const COMPANY = 2;
  const ADDRESS = 3;
  const CITY = 4;
  const ZIP_PIN = 5;
  
  
  /* Get data from the sheet */
  var sheet = SpreadsheetApp.getActiveSheet();
  var data = sheet.getDataRange().getValues();
  /*
   * Alternatively you can get data * from an external CSV file or anything else....
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images