0

I made an script for a Google Sheets. It's been a month since people used it and worked perfectly.

Basically the script looks in a spreadsheet, makes some formulas with the data and returns a value.

At the beginning of the script I call for "SpreadsheetApp.getActiveSpreadsheet()" function that returns me the actual spreadsheet. The problem is that sometimes the script returns an error that says "Reference error: SpreadsheetApp is undefined".

The weird thing is that if I close the Spreadsheet and open it again after 5 minutes (random time) the script works well! I can't find the error pattern. I don't know if it's something I made, or something from Google.

Can anyone help me?

1
  • 1
    I think its a Google Apps Script problem. May be, for periods of time, SpreadshhetApp isn't available! I've a script accessing 100+ times a day (time driven) to a GMail account. Every day it fails a couple of time: GMail isn't available! Commented Mar 14, 2012 at 11:20

1 Answer 1

1

Try open spreadsheet by ID

SpreadsheetApp.openById("0sdfksdlfkjsdlkfj_example_fdslkfjlsjkf");
Sign up to request clarification or add additional context in comments.

1 Comment

I stopped having this problem. I think that reducing my execution time solved this issue. But I'm not certain so I don't really have the answer... sorry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.