Fitbit-for-Google-App-Script icon indicating copy to clipboard operation
Fitbit-for-Google-App-Script copied to clipboard

Trigger Failures

Open hellogeli opened this issue 10 years ago • 1 comments

I got such message when using trigger to update data every hour:

Your script, Daily Activity, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.

The script is used by the document Untitled spreadsheet.

Summary:

Error Message Count Please select an active sheet first. (line 43, file "Code") 24

Any ideas?

Thank you!

hellogeli avatar Apr 29 '14 09:04 hellogeli

Try inserting this code: var doc = SpreadsheetApp.openById("INSERT_SPREADSHEET_ID"); doc.getSheetByName("INSERT_SHEET_NAME");

Instead of this: var doc = SpreadsheetApp.getActiveSpreadsheet();

Helped me!

valt449 avatar Mar 15 '15 10:03 valt449