Skip to content

Instantly share code, notes, and snippets.

@DominicBreuker
Last active April 9, 2016 08:56
Show Gist options
  • Save DominicBreuker/6adc463c6f3ac2e241d0113a360f8bda to your computer and use it in GitHub Desktop.
Save DominicBreuker/6adc463c6f3ac2e241d0113a360f8bda to your computer and use it in GitHub Desktop.
var SCRIPT_PROPERTIES = PropertiesService.getScriptProperties();
function registerSpreadsheetWithScript() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = SpreadsheetApp.getActiveSheet();
SCRIPT_PROPERTIES.setProperty("spreadsheetId", spreadsheet.getId());
SCRIPT_PROPERTIES.setProperty("sheetName", sheet.getName());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment