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

134
Views
¿Cómo iterar sobre un rango y una matriz de datos y establecer los valores de matriz iterados hasta que no haya datos usando GAS?

Esto puede parecerte simple, pero bueno... aquí estoy.

El siguiente código establece aparentemente el último valor Mangas en todas las celdas de rangeList , mientras que debe establecer Alca en A10, Mangas en F10 y detenerse, porque solo hay 2 elementos.

 const rngs = ["A10", "F10", "J10", "A12", "F12", "J12"]; const rangeList = sheetVendSobEnc.getRangeList(rngs).getRanges(); let coresPartes = ["Alca", "Mangas"] for (let a = 0; a < rangeList.length; a++) { for (let n = 0; n < coresPartes.length; n++) { rangeList[a].setValue(coresPartes[n]) } }

¡Gracias de antemano!

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

0

Creo que lo que quieres es esto?

 const rngs = ["A10", "F10", "J10", "A12", "F12", "J12"]; const rangeList = sheetVendSobEnc.getRangeList(rngs).getRanges(); let coresPartes = ["Alca", "Mangas"] for (let a = 0; a < rangeList.length; a++) { if( coresPartes[a] === undefined ) return; // or break i'm no sure rangeList[a].setValue(coresPartes[a]) } }
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!