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

241
Visualizações
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 à 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