July 26, 2018 Updated. Result of reduce was added.
October 18, 2018 Updated. In order to compare with Advanced Google Service, a result of Sheets API by UrlFetchApp was added to Appendix.
This is a sample script for converting a PDF file to a TXT file. 2 steps are required for this.
- Upload a PDF file as a Google Document
- Download a Google Document as a TXT file
In this sample, Python Quickstart is used. The detail information is https://developers.google.com/drive/v3/web/quickstart/python. Please read "Step 1: Turn on the Drive API" and "Step 2: Install the Google Client Library".
This is a sample script for expanding a1Notations using Google Apps Script (GAS). In this script, for example, "A1:E3" is expanded to "A1, B1, C1, D1, E1, A2, B2, C2, D2, E2, A3, B3, C3, D3, E3". When each cell in "A1:E3" is checked, this script might be able to be used. If this was useful for your situation, I'm glad.
function expandA1Notation(a1Notations) {
var columnToLetter = function(column) {
var temp, letter = '';
while (column > 0) {
This is a sample script for retrieving the access token for Service Account using Google Apps Script. The flow for using this script is as follows.
- At first, please create the Service Account and retrieve JSON file.
- Put Scopes,
private_key
andclient_email
to the script. - Run the script.
var private_key = "#####"; // private_key of JSON file retrieved by creating Service Account
var client_email = "#####"; // client_email of JSON file retrieved by creating Service Account