Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!