Uncaught ReferenceError: SpreadsheetApp is not defined

6,049 views
Skip to first unread message

frederik van everbroeck

unread,
Nov 27, 2014, 7:26:19 AM11/27/14
to adwords...@googlegroups.com
It probabely looks simple to you guy's, but I keep getting this error... "Uncaught ReferenceError: SpreadsheetApp is not defined"

Any help here?

Juan Ramon Sanfeliu Salva

unread,
Nov 27, 2014, 1:44:35 PM11/27/14
to adwords...@googlegroups.com
Hi, have u create your copy of the spreadsheet of the script example?

You must create a copy to store in your google drive, and then update the URL of the spreadsheet in your script.

Tell me if this doesn't work for you.

Cheers.

frederik van everbroeck

unread,
Dec 2, 2014, 6:46:52 AM12/2/14
to adwords...@googlegroups.com
Hi! Thank you for the reply.

But I think that the Class SpreadsheetApp could not be found. Not the spreadsheet itself...



Op donderdag 27 november 2014 19:44:35 UTC+1 schreef Juan Ramon Sanfeliu Salva:

Matt Greenland

unread,
Dec 2, 2014, 3:26:18 PM12/2/14
to adwords...@googlegroups.com
Hi Frederik,

That's really strange; SpreadsheetApp is built-in and should always be available.

If you put the cursor on a blank line and press ctrl-space, does SpreadsheetApp show up in the autocomplete? If you try creating a new script (or loading a different script), does SpreadsheetApp work there?

frederik van everbroeck

unread,
Dec 4, 2014, 11:07:36 AM12/4/14
to adwords...@googlegroups.com
Hi matt, thank you for the reply!

If it is any help, it's located at http://www.pelsland.be/google/bid-by-weather.php
I tried to open console in chrome developer and ctrl+space opens a list of available options, but SpreadsheetApp is not there... 

Matt Greenland

unread,
Dec 4, 2014, 6:41:26 PM12/4/14
to adwords...@googlegroups.com
OK, that looks like the issue. Even though they're written in Javascript, AdWords scripts don't run in the browser. The scripts instead get run on Google servers, which is where things like SpreadsheetApp and AdWordsApp are defined.

What you probably want to do instead is to put your script in the AdWords UI and run it from there. Check out the quick start guide for an example of how to do that.

Jonathan Chow

unread,
Apr 16, 2018, 6:55:13 AM4/16/18
to AdWords Scripts Forum
What I found was that I couldn't copy paste lines of code..SpreadsheetApp calls, as well as other function calls, had to be entered with Ctrl + Space for me - the exact same line of code no longer threw undefined errors. Might be due to gas not recognising the call if it's pasted in

Hope that helps 

Anthony Madrigal

unread,
Apr 16, 2018, 10:10:51 AM4/16/18
to AdWords Scripts Forum
Thanks for the input, Jonathan.

If anyone faces any issues, please let me know.

Regards,
Anthony
AdWords Scripts Team

Brian Onesto

unread,
Aug 21, 2019, 6:52:46 PM8/21/19
to Google Ads Scripts Forum
Its capital 'S' SpreadsheetApp
Not lower case 's' spreadsheetApp
even though the google documentation says it with lower case. 

Google Ads Scripts Forum Advisor Prod

unread,
Aug 22, 2019, 2:01:59 AM8/22/19
to adwords...@googlegroups.com

Hi Brian,

Thank you for your comment.

Since this is an old thread, if anyone is encountering issues, feel free to open a new thread so we can track on our end better.

Regards,
Hiroyuki
Google Ads Scripts Team



ref:_00D1U1174p._5001UHEJV6:ref
Reply all
Reply to author
Forward
0 new messages