📜  google sheet 自动更新车 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:19.140000             🧑  作者: Mango

代码示例1
function storeFollowers(){
    var sheet = SpreadsheetApp.getActiveSheet();
    var datarange = sheet.getDataRange();
    var numRows = datarange.getNumRows();
    var numColumns = datarange.getNumColumns();
    var nextColumn = numColumns + 1;
    sheet.getRange(1, nextColumn).setValue(new Date());
    for (var i=2; i <= numRows; i++){
      var numLikes = sheet.getRange(i, 3).getValue();
      sheet.getRange(i, numColumns + 1).setValue(numLikes);
    }
}