March 2016
Beginner to intermediate
232 pages
4h 29m
English
You can create an application to convert Sheet data into a PDF file and store it in Drive, and return the PDF file's URL to the user:
In the Code.gs file, create the doGet function as listed here:
function doGet() { /* * This spreadsheet may not be active while this function * executes, so you cannot get access to active spreadsheet, * use open by id. * */ var ss = SpreadsheetApp.openById("[[ this spreadsheet id ]]"); var SheetData = ss.getSheetByName("Data"); var template = HtmlService .createTemplateFromFile("Template.html"); // Assign 'data' to the template object template.data = SheetData.getDataRange().getValues(); // Evaluate template object as html content var html = template.evaluate(); // Convert html ...Read now
Unlock full access