admin管理员组

文章数量:1123009

I append data from 1st row "A-E" Column to new row everyday via google script to keep data history. I need a script to change this last row data in "D" Column as per 1st row when needed.
Please guide on What to add/change in this script

function saveData() {
  
  {

  const ss = SpreadsheetApp.getActiveSpreadsheet();
  const sheet = ss.getSheetByName('History');
  const date = sheet.getRange('History!A1').getValue();
  const data1= sheet.getRange('History!B1').getValue();
  const data2 = sheet.getRange('History!C1').getValue();
  const data3 = sheet.getRange('History!D1').getValue();
  const data4 = sheet.getRange('History!E1').getValue();
    sheet.appendRow([date,data1,data2,data3,data4]);
  
}
}

本文标签: google apps scriptHow to edit data of in last row of Column D of Specific SheetStack Overflow