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

1

224
Visualizações
I have this code to drag all the data to another tab, however sometimes it is slow and some data is not saved, is deleted or is blank
function onEdit(){ var archi = SpreadsheetApp.getActive().getSheetByName("productividad"); var ss = SpreadsheetApp.getActive().getSheetByName("Asignación Free"); var uf = ss.getLastRow(); var datos = ss.getRange(1,1, uf, 9).getDisplayValues(); var archivos = SpreadsheetApp.getActive().getSheetByName("productividad"); var sa = SpreadsheetApp.getActive().getSheetByName("Asignación Pro"); var uf = sa.getLastRow(); var datosdos = sa.getRange(1,1, uf, 9).getDisplayValues(); for(var i=1;i<datos.length;i++){ if(datos[i][7]== "Aprobado"||datos[i][7]== "Rechazado"){ let positionCell = 1; let isHasNoValues = false; var hojaDestino = archi.getRange(positionCell,1,1,9); while(!isHasNoValues){ if (!hojaDestino.getDisplayValue()){ ss.getRange(i+1,1,1,9).copyTo((hojaDestino),{contentsOnly:true}); ss.getRange(i+1,3,1,8).clearContent(); isHasNoValues = true; }else{ positionCell++; hojaDestino = archi.getRange(positionCell,1,1,9); } } } } for(var i=1;i<datosdos.length;i++){ if(datosdos[i][7]== "Aprobado"||datosdos[i][7]== "Rechazado"){ let positionCell = 1; let isHasNoValues = false; var hojaDestino = archivos.getRange(positionCell,1,1,9); while(!isHasNoValues){ if (!hojaDestino.getDisplayValue()){ sa.getRange(i+1,1,1,9).copyTo((hojaDestino),{contentsOnly:true}) sa.getRange(i+1,3,1,7).clearContent(); isHasNoValues = true; }else{ positionCell++; hojaDestino = archivos.getRange(positionCell,1,1,9); } } } } SpreadsheetApp.flush(); }; //si me pueden ayudar a saber como hacer que funcione bien ya su vez se optimice, muchas gracias
about 4 years ago · Hanna Amaya
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