I have only pasted a part of the code which I am trying to run separately.
function myFunction() {
var files = DriveApp.searchFiles('title contains "Companies_OHLC_0"');
while (files.hasNext()) {
var spreadsheet = SpreadsheetApp.open(files.next());
}
}
it was working sometime back but I keep getting this exception now:
Exception: Unexpected error while getting the method or property open on object SpreadsheetApp. (line 4, file "Code").