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

0

240
Vistas
When I copy data using Goolge Scripts it skips rows Is there a work around?

I have tried looping to just remove the cells I wanted but that didn't work, I have also tried adjusting how it looks at the cells in a range but and just messed around with everything i could find and think of but to no avail this is the closest thing I can get to. My goal is to copy data from one sheet to another based off of a specific value and it all look like I entered them in row by row with no skipping.


    function tranferData(){
      var today = new Date(getCurrentMonth());
      var ss=SpreadsheetApp.getActive();
      var sht=ss.getSheetByName('Sheet1');
      var sht2=ss.getSheetByName('Sheet2');
      var lastRow=sht.getLastRow();
      var lastColumn=sht.getLastColumn();
      var rng=sht.getRange(1,1,lastRow,lastColumn);
      var rngA=rng.getValues();
      for(var i=0;i<rngA.length;i++)
      {
        var test = rngA[i][2];
        if(test < today  && test != null && test != 0)
        {
          sht2.getRange(i+1,1).setValue(rngA[i][0]);
          sht2.getRange(i+1,2).setValue(rngA[i][1]);
          sht2.getRange(i+1,3).setValue(rngA[i][2]);
          sht2.getRange(i+1,4).setValue(rngA[i][3]);
        }
      }
      SpreadsheetApp.flush();
    }

about 4 years ago · Juan Pablo Isaza
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