Skip to content

Instantly share code, notes, and snippets.

@seoutopico
Created July 15, 2022 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seoutopico/94907bab928a56d893a7636fe2d985f7 to your computer and use it in GitHub Desktop.
Save seoutopico/94907bab928a56d893a7636fe2d985f7 to your computer and use it in GitHub Desktop.
Gas copiar de un sheet a otro
/*
** Source sheet = Sugerencias
** Target sheet = Lista kw's importadas
*/
function importar() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sourceSheet = ss.getSheetByName("Sugerencias");
var sourceRange = sourceSheet.getRange ("E9:D18");
var sourceValues = sourceRange.getValues();
Logger.log(sourceValues)
let rowCount = sourceValues.length;
let columnCount = sourceValues[0].length;
var destino = ss.getSheetByName("Lista kw's importadas");
var destinoRange = destino.getRange(1,1, rowCount,columnCount);
destinoRange.setValues(sourceValues);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment