Search code examples
google-apps-scriptgoogle-sheetsversion-controlgoogle-drive-api

How to access revision history of a spreadsheet using GAS?


Is it possible to access revision history data of a spreadsheet directly from Google Apps Scripts? If so, how?

I would like to do two things:

  1. Change the username logged for each revision to the actual user running the script and not the script author/owner. As I've just learned, revision history of a spreadsheet that's accessed and modified using GAS always reflects the script owner/author instead of the user running the script.

If the above is not possible, then

  1. Get direct read access to revision number and username in the history straight from GAS. From there, I'll just do a comparison table and hope for the best that I'll achieve the same effect.

Solution

  • I don't believe it's possible to access the revision history with Apps Script. There is an open feature request for this ability though, and if you star it you'll receive an email when there is an update:

    http://code.google.com/p/google-apps-script-issues/issues/detail?id=394