Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

45
Vistas
google app scripts Find Value then copy entire row

I'm really new to google sheets app script. I need an script which finds a date in row 1, selects the entire row and copy and paste values only. This is because I have formulas in each column which will only work if row 1 matches =today().

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

To get the range values and save into a variable (copy):

var book = SpreadsheetApp.openByUrl(url); //url=spread sheet url
var sheet = book.getSheetByName("sheet name");
var range = sheet.getRange(a, b, x, y).getValues(); 
//a=inicial row ,b=inicial column, x=last row, y=last column
// range will be a bidimensional array
// "A1" cell value will be: range[0][0]

To append in new cells (paste): //you have to iterate the array

sheet.appendRow([range]);
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos