Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

1

225
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda