如何使用脚本在 Google Docs 中获取修订历史? [英] How can I get the revision history in Google Docs using a script?

查看:19
本文介绍了如何使用脚本在 Google Docs 中获取修订历史?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用脚本获取 Google 文档中的修订历史记录?

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

我该怎么做?一些想法?

How can I do it? Some ideas?

推荐答案

我不敢相信,但似乎不可能以编程方式获得 Google 文档文件"的修订历史版本.我彻底检查了 Drive SDK 似乎我们所能做的就是下载其他格式的 Google 文档(可能会丢失转换的详细信息).无需从修订版生成新的 Google 文档,甚至无需在当前文件上恢复修订版.

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.

因此,您可以将特定的修订历史下载"为 docx,然后将其重新上传并转换回 Google Docs(呃!),然后正常访问.为此,您必须启用 Drive API v2 高级服务(在资源菜单下).并使用 Drive SDK 参考(上面链接)获取修订历史并执行此操作.

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.

这篇关于如何使用脚本在 Google Docs 中获取修订历史?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆