How to get cell edit date in Google Sheets via API?

你。 提交于 2021-02-10 11:50:37

问题


I have auto-updated Google Sheet with 1500+ rows. I need to fill new column with Dates when A-column cells were changed.

I have tried to get data from Google Drive Revisions, but I can't "look inside of the file" without downloading, cause this API provides only exportLinks.

How can I get cells edit dates via API or some other way?

It will be great to write smth like:

sheet = SpreadsheetApp.getActiveSheet(),
AColumn = sheet.getRange('A1:A')
ALastRow = AColumn.lastrow()

for (var i = 1; i < ALastRow: i++)
{ 
  cell = AColumn.getRange('A'+i)
  cellEditDate = cell.lastUpdate["date"]
  sheet.getRange('B'+i).setValue(cellEditDate)
}

Thanks!

P.S. From UI cell edit date can be obtained through this feature.

来源:https://stackoverflow.com/questions/57485065/how-to-get-cell-edit-date-in-google-sheets-via-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!