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

261
Views
How to print a nested Array to an excel sheet

I'm a beginner in programming, and I'm trying to print a nested array to a sheet. sourceData is an array that has 252 other arrays inside it and each one of these arrays has 10 element, so i want to print these 10 elements in 10 column (each element in its own cell) in one row 252 times. I tried doing that using a for loop but it was getting the first element only "370" in all the columns + in 502 rows and i feel like its very messy.

var y=0;
  for(let x=3; x<sourceData.length+3; x++){//   x is number of the row


  
  thisSheet.getRange(parseInt(x),1 ,sourceData.length,10).setValue(sourceData[y]);
  y++;
  }

If you need more information please let me know.

I have been stuck here for too long and would really appreciate the help.

Thank you.

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

0

You shouldn't need a loop.

Try

thisSheet.getRange(3, 1, sourceData.length, sourceData[0].length).setValues(sourceData)
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!