且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Google Apps脚本下载创建的csv文件?

更新时间:2023-02-25 13:30:15

请尝试使用 ContentService ,您可以触发下载,甚至通过 TextOutput.downloadAsFile方法设置文件名。您还可以设置返回数据的内容MIME类型,但仅限于预定义的枚举常量。请参阅其示例

Try using ContentService, you can trigger a download and even set the file name via the TextOutput.downloadAsFile method. You can also set the content mime type of the returned data, though only to a predefined enum constant. See their examples.