gpt4 book ai didi

google-apps-script - 将电子表格本地下载到我的电脑的脚本

转载 作者:行者123 更新时间:2023-12-05 08:09:05 25 4
gpt4 key购买 nike

我有 script下载我的电子表格,但它只是将它保存到谷歌驱动器。任何人都可以帮助我知道如何将它下载到我电脑上的本地文件夹吗?谢谢

最佳答案

您可能想尝试使用 Content Service :

When a script is published as a web app, the special callback functions doGet() and doPost() are invoked whenever a request is made to the script's URL. Instead of returning a user interface object created with the HTML service, the Content service can be used to return raw textual content. This allows you to write scripts that act as "services", responding to GET and POST requests and serving data of various MIME types.

您可以在那里触发下载,甚至可以通过 TextOutput.downloadAsFile 设置文件名方法。

尝试查看相关的 SO 帖子:Download file from Google Drive to local folder from Google Apps ScriptGoogle App Script ContentService downloadAsFile not working .

希望这些信息对您有所帮助。

关于google-apps-script - 将电子表格本地下载到我的电脑的脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41701751/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com