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

236
Views
necesita ayuda para enviar valores y formatear las columnas G:M en las hojas de Google como correo electrónico a través de un script

Estoy tratando de tomar todo el contenido de una hoja de Google de las columnas G:M y enviarlo como valores manteniendo el formato condicional, los colores y el formato de número correctos en un correo electrónico una vez por semana. He probado algunas variaciones y sigo obteniendo resultados extraños. ¿Alguien tiene alguna recomendación?

Gracias.

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

0

Puede crear una función para copiar el formato a las celdas.

 function copyCellsFormat(source, destination) { var ss = SpreadsheetApp.getActive(); // Get the cells var sourceSheet = ss.getSheetByName(source); var range = sourceSheet.getRange(1, 1, sourceSheet.getMaxRows(), sourceSheet.getMaxColumns()); // The target of data formatting rules var destinationSheet = ss.getSheetByName(destination); range.copyFormatToRange(destinationSheet, 1, sourceSheet.getMaxColumns(), 1, sourceSheet.getMaxRows()); }

No dude en consultar la documentación en https://developers.google.com/apps-script/reference/spreadsheet/range#copyFormatToRange(Sheet,Integer,Integer,Integer,Integer)

O si desea crear las reglas de formato condicional mediante programación, es posible que desee consultar https://developers.google.com/apps-script/reference/spreadsheet/conditional-format-rule-builder

 // Adds a conditional format rule to a sheet that causes cells in range A1:B3 to turn red if // they contain a number between 1 and 10. var sheet = SpreadsheetApp.getActiveSheet(); var range = sheet.getRange("A1:B3"); var rule = SpreadsheetApp.newConditionalFormatRule() .whenNumberBetween(1, 10) .setBackground("#FF0000") .setRanges([range]) .build(); var rules = sheet.getConditionalFormatRules(); rules.push(rule); sheet.setConditionalFormatRules(rules);
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!