Google Product Forums

Re: problem with script trigger on form submit


deltafox1229 Apr 25, 2012 9:08 AM
Posted in group: Google Apps Script
Do you mean SpreadsheetApp.getActiveSpreadsheet().getSheetByName("sheet name")? I don't see a SpreadsheetApp.getActive() method listed...

On Monday, October 11, 2010 7:54:02 AM UTC-4, Henrique Abreu wrote:
when you use a trigger like onFormSubmit or time-driven, there's no "active" sheet. The spreadsheet may not even be opened by anyone. I recommend using SpreadsheetApp.getActive().getSheetByName("sheet name") instead.

By the way, this question was already recently asked and answered (by the own user) here:
http://www.google.com/support/forum/p/apps-script/thread?tid=762c389aef300097