Просто вставьте в code.gs и запустите функцию showSideBar. Обратите внимание на инструкции, приведенные в верхней части боковой панели, и все должно работать нормально.
function sendCurrentRow() {
var tssid='target spreadsheet id';//put the target spreadsheet id here
const ss=SpreadsheetApp.getActive();
const sh=ss.getActiveSheet();
const rg=sh.getActiveRange();
const row=sh.getRange(rg.getRow(),1,1,sh.getLastColumn()).getValues();
const tss=SpreadsheetApp.openById(tssid);
var tsh=tss.getSheetByName(sh.getName());
if(!tsh) {
var tsh=tss.insertSheet(sh.getName())
}
tsh.getRange(rg.getRow(),1,1,sh.getLastColumn()).setValues(row);
}
function showSideBar() {
var html='<p>If you haven put you target spreadsheet id in function sendCurrentRow() then do before pressing button below.</p><p>Place cursor on the row you wish to send and click button below.</p><br />'
html+='<input type="button" value="Send" onClick="google.script.run.sendCurrentRow()" />';
SpreadsheetApp.getUi().showSidebar(HtmlService.createHtmlOutput(html).setTitle('Send Current Row'));
}