Pequeño código para dar formato a columna en google sheets.

223 views
Skip to first unread message

Rafael Ugarte

unread,
Jan 5, 2022, 8:22:41 PM1/5/22
to Google Apps Script Community
Buenas noches con todos.

Tengo un problema, necesito copiar el formato color de relleno de un rango de celdas pero no funciona como deseo y no se que estoy haciendo mal. Por favor quien pueda ayudarme o guiarme, se lo agradeceré muchísimo. El código es el siguiente:


function FormatearColumna() 
{
  const libro = SpreadsheetApp.getActiveSpreadsheet()
  var ColumnaOrigen = libro.getRange("Operación & Logistica!B9:B494");
  var ColumnaDestino = libro.getRange("PlanifFruta!B9:B494")
  var AvisoEnDestino = libro.getRange("PlanifFruta!L7")
     
  ColumnaOrigen.copyTo(ColumnaDestino,SpreadsheetApp.CopyPasteType.PASTE_FORMAT,false);

  AvisoEnDestino.setValue("REVISAR EL PROGRAMA // EXISTEN CAMBIO DE COLOR EN LOS BK's // MICSY, FAVOR, ELIMINAR ÉSTE MENSAJE DESPUES DE LEER")

  // ColumnaDestino.setFontColor("#2f5496")
}
Reply all
Reply to author
Forward
0 new messages