0
votes

From an external desktop application, using the Google Sheets API, I would like to enumerate the cells in a spreadsheet (I know how to do this), and for each, determine the timestamp at which that cell was last updated (I don't want to know the entire edit history, just the timestamp of the most recent update).

How can I do this? The 'CellData' structure contains information about data validation rules, the user formula, formatting, user value, etc. But I dont see anything related to edit timestamp :(

There are some hacky workarounds. e.g. I could have an App Script method "onEdit()", that e.g. writes the timestamp at which it was triggered to a cell in a secondary sheet or something. However - my desktop application uses Google Sheets API to create the google sheet in the first place - and via the Google Sheets API, I see no mechanism to create/associate Google App Script with my programatically created sheet :(

Thanks

1
It's not possible to get the cell edited with the API, but you can get the timestamp of the last edit of the whole Spreadsheet using the Drive API.Jescanellas
Right, but that doesn't serve my purpose unfortunately :(md1000

1 Answers

2
votes

As I said in the comment, it's not possible to get each cell's timestamp. However, there is a Feature Request on Google's Issue Tracker which also requests this.

You can click on the star next to the issue number to give more priority to the request and to receive updates (avoid commenting +1).