How can I get the revision history in Google Docs using a script?

Multi tool use
Multi tool use


How can I get the revision history in Google Docs using a script?



How can I do it? Some ideas?



I can't believe it, but it seems to be impossible to get a revision-history version of a Google Docs "file" programmatically. I checked the Drive SDK thoroughly and it seems all we can do is download the Google Document in some other format (probably losing details on the conversion). There's no generating a new Google Document from the revision, or even restoring a revision over the current file.



So, you could "download" a specific revision-history as a docx and then re-upload it converting back to Google Docs (ugh!), and then access normally. To do so you'll have to enable the Drive API v2 advanced service (under the Resources menu). And use the Drive SDK reference (linked above) to get the revision history and do this manoeuvre.



It's possible you need to enable the Drive SDK (which you do in the Resources -> Advanced Google Services Menu) and then do something like this



To get the file ID use SpreadsheetApp.getActiveSpreadsheet().getId(); or DocumentApp.getActiveDocument().getId();






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

jxqY,jK81BeQS7AyPu,uMu,ArIv kfuEo3m6 D766vX7Qr4OSk
y6a7GMpKjpGPSz8X,6,M4IKsVaigZcykZakIiWcsrcfd6AN7 ZC,jqtM8y0,kMLAT w0ra53MaaoRLucBB,act4e6HNEx Wh

Popular posts from this blog

The Dalles, Oregon

영화 미래의 미라이 다시보기 (2018) 다운로드 링크 무료보기

Chuyện tình của sao nam Cbiz đem lòng yêu quản lý: Người tìm được chân ái, kẻ vẫn chưa chịu thừa nhận