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

112
Views
Looping through URL list in the sheet against cell value in another spreadsheet

Is anyone able to help me? I have a spreadsheet which includes a sheet with list of URL's of files in my google drive. Now I need to move the data from another spreadsheet to these files considering that the data is mixed and I need a loop to check the cell value against file name. Hours of googling did not give me any idea.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Perhaps this will help

function moveDatatolistoffileurls() {
  const ss = SpreadsheetApp.getActive();
  const sh = ss.getSheetByName("Your Sheet Name");
  const [hA, ...vs] = sh.getDataRange().getValues();//assume one header row
  let col = {};
  hA.forEach((h, i) => { col[h] = i + 1; })
  vs.forEach((r, i) => {
    let s = SpreadsheetApp.openByUrl(r[col["url header string"]]);
    if(s.getName() == r[col["file name header"]]) {
      s.getSheet()[0].appendRow(r);
    }
  })
}

If you want a better answer then ask a better question.

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