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

251
Visualizações
I am trying to get values from specific columns

I have try to get values from specific columns from google sheet and for loop to find matching between column title name and row names so if user click on a button that have info about a movie all name of the cast in that movie will appear in a table, The code I have does that right , but there are columns that contain people's names that I don't want to show Is there a way to get the data with the same code that I have, but with specific columns that get all the data from?

My code

function getSecondData(moveId){
  if(moveId == undefined)
    moveId = 14;
  var secondSS = SpreadsheetApp.openById(ss2);
  var secondSh = secondSS.getSheetByName('Moves');
  var Data = secondSh.getDataRange().getValues();
  var actorName= secondSh.getRange(1,5,1,secondSh.getLastColumn()).getValues();
  Data.splice(0,1);
  var tmpData = [];
  for(var x=0 ; x<Data.length ; x++){
    if(Data[x][3] == moveId){
      tmpData.push(Data[x]);
    }
  }
  var finalData = [];
  for(var x=0 ; x<tmpData.length ; x++){
    for(var y=4 ; y<tmpData[x].length ; y++){
      if(tmpData[x][y] != ''){
       finalData[y-3] = tmpData[x][y]+'^'+tmpData[x][0];
       }
    }
  }
  return {'data':finalData,'move':moveId,'files':actorName}
}

I have tried getRangeList() but dose not give you the value and you cant use push() on it

Because it is not possible to explain the whole process in detail, I designed it on Figma https://www.figma.com/file/8s69QPKmWIHLrlKuDz6NyH/

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