Last active
August 29, 2015 14:25
-
-
Save juniorthiesen/8aecac6853b7c828788e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\\script para gerar e salvar um pdf dentro do drive. | |
function onOpen() { | |
SpreadsheetApp | |
.getUi() | |
.createMenu('Gerar PDF') | |
.addItem('Gerar PDF', 'printpdf') | |
.addToUi(); | |
} | |
function printpdf() { | |
//Gera o PDF e salva no Google drive | |
var spreadsheet_id = ('1VQnvUk1Hq4R60aUpJm6pEPe66nBUye5PTDJo4HGUrdA'); | |
var spreadsheetFile = DriveApp.getFileById(spreadsheet_id); | |
var blob = spreadsheetFile.getAs('application/pdf'); | |
DriveApp.createFile(blob); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment