copy and paste with google spreadsheet script -


i modify script shown below, if re-run, not overwrite pre-existing data, instead writes rows under it.

(i use google spreadsheet)

movevaluesonly fonction () { var ss = spreadsheetapp.getactivespreadsheet (); var source = ss.getrange ("sheet1 f1: h3 '); source.copyto (ss.getrange ("feuil2 a1! '), {contentsonly: true}); source.clear (); } 

this version find first empty row in destination sheet, , copy source data starts there.

function movevaluesonly () {   var ss = spreadsheetapp.getactivespreadsheet ();   var source = ss.getrange ("sheet1!f1:h3");   var destsheet = ss.getsheetbyname("feuil2");   // déterminer l'emplacement de la première ligne vide.   var destrange = destsheet.getrange(destsheet.getlastrow()+1,1);   source.copyto (destrange, {contentsonly: true});   source.clear (); } 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -