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

246
Vistas
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 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