更新时间:2023-02-25 10:19:11
1,2,3 - 完全可能。
生成CSV包含在其中一个Apps脚本教程。请参阅保存选定范围从 教程:与您的文档列表进行互动 。
来自云端硬盘的文件在 MailApp.sendEmail()。
I have a script that turns a submitted form into a PDF and emails it automatically but I can't seem to get my head around if it is possible to implement a function i would like: -
Is this possible? I feel like I am missing a simple way to do this but I am having a moment of noobishness! :-)
1, 2, 3 - all quite possible.
4 - Not as such. There's no support in Google Apps Script for converting a Sheet to Excel format. However you could produce a CSV file which would be understood by Excel or any other spreadsheet program, and email that as an attachment.
Generating a CSV is covered in one of the Apps Script tutorials. See Saving a selected Range to a CSV file from Tutorial: Interacting With Your Docs List.
An example of attaching files from Drive is provided in the documentation for MailApp.sendEmail().