我有一个 Google Sheet Script,它将页面作为 PDF 发送到电子邮件,直到昨天它一直运行良好。突然它开始发送无法打开的损坏的 PDF。
脚本运行得很好,如果只是无法打开 PDF 文件,因为它说“无法显示 - 格式无效”。
关于为什么它可能停止工作的任何想法?
function sendSheetToPdfwithA1MailAdress(){ // this is the function to call
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sh = ss.getSheets()[0]; // it will send sheet 0 which is the first sheet in the spreadsheet.
// if you change the number, change it also in the parameters below
var shName = sh.getName()
// This function uses a cell in the spreadsheet that names the file that is being saved as getfilename(). …Run Code Online (Sandbox Code Playgroud)