Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

199
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda