Tag: google apps script

  • How to use Google Apps Script to get data from a connected data sheet

    Regular sheets are straightforward For a regular Google Sheets spreadsheet, it’s fairly easy to use Google Apps Script to get the data contained on a worksheet:     var spreadsheet = SpreadsheetApp.getActive();     var regularsheet = spreadsheet.getSheets()[0];     var range = regularsheet.getDataRange();     var values = range.getValues();     for ( j = 0; j < values.length; j++ ){         Logger.log(values[j][0] + ': […]

  • Changing ownership of files in Google Drive via Google Apps Script

    This was a fun little exercise in Google Apps Script to essentially transfer ownership of Google Drive files from one user to another. Here’s a script that the old user should run to change ownership of those files to the new user: ChangeFileFolderOwnership.js And here’s a script that the new user user should run to […]