This code works as is, but it also adds the blank rows -- if there are 4 rows with data and 4 blank rows, the script adds 4 blank rows after the data is copied to the new sheet.
I need it to only copy the row with data, and not add the blank rows on the new sheet.
function saveToData() {
var ss, s, r, v, target,ts,tss;
ss = SpreadsheetApp.getActive();
s = ss.getSheetByName('Entry');
if (s.getRange(3, 1).getValue()) {
r = s.getDataRange()
.offset(2, 0, s.getLastRow()-1,12);
v = r.getValues();
r.clear()
tts = SpreadsheetApp.openById('10_XEaQiR71QN_90nIIIvDAU6un1KuOhi9--
AVVtk5FI'); destination ID
ts = tts.getSheetByName('Data');destination Sheet
tab name
ts.getLastRow()+1
.setValues(v);
}
}
if (s.getRange(3, 1).getValue()) {
in your script? I would like to try to think of your solution after I could understand what you want. I'm really sorry for my poor English skill. – Tanaike