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

86
Views
Declaración IF de AppScript de hoja de Google

Tengo un informe de ventas como el siguiente

ingrese la descripción de la imagen aquí

Quiero tomar los datos de Sale1person1 si la venta son artículos de comida y Sale1person2 si la venta es Gadget y proporcionarlos a la línea de archivo HTML

 emailTemp.htmlsalevalue=row[???];

¿Cómo crear una declaración if en emailTemp para obtener los datos correspondientes?

 function myFunction() { var sale=9; var person1=10; var person2=11; var emailTemp = HtmlService.createTemplateFromFile("Table"); var ws= SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Form Responses 3"); var data = ws.getRange(ws.getLastRow(),1,1,ws.getLastColumn()).getValues(); data.forEach(function(row){ emailTemp.htmlsale=row[sale]; }) }
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!