Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
Appscript-wait for gsheets to load completely and then copy rows and columns?

Sorry not an expert in appscript, but need some help with (automating) copy-pasting gsheets. I have a gsheet at work, that needs copy-pasting a lot of rows and columns into other gsheets. The problem is - this source gsheet takes nearly 30 min to load all the values(due to different formulas).

I am trying to automate this copy-pasting process, through appscript but I am stuck at the very first step. I can't even get the appscript to print the names of sheets. The script runs for a few mins and then times out. So I wrote a script where it 'waits' for 30 min,(hopefully by that time the gsheets finishes loading) and then starts copying the values I want. It looks like this:

 function getallsheetnames() {

 Utilities.sleep(300000)      
//var lock = LockService.getScriptLock();
// Wait for up to 30 min for other processes to finish.
//lock.waitLock(300000);
var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
console.log(sheets)
}

The problem is the script times out, even though it is told to sleep for 5 min. What can I do? any help will be greatly appreciated

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!