admin管理员组文章数量:1123272
const fileTitle = ss.getRange(i, 2).getValue(); // test1; test2
var blob = Utilities.newBlob(htmlBody, 'text/html').getAs('application/pdf').setName({fileTitle}&'.pdf');
DriveApp.createFile(blob);
I do not know why I get 0 as file name instead of test1 test2 - when I check Logger.log of the fileTitle - I get the correct name - test1, test2
const fileTitle = ss.getRange(i, 2).getValue(); // test1; test2
var blob = Utilities.newBlob(htmlBody, 'text/html').getAs('application/pdf').setName({fileTitle}&'.pdf');
DriveApp.createFile(blob);
I do not know why I get 0 as file name instead of test1 test2 - when I check Logger.log of the fileTitle - I get the correct name - test1, test2
Share edited 11 hours ago Agnieszka Liszka asked 11 hours ago Agnieszka LiszkaAgnieszka Liszka 34 bronze badges 4 |1 Answer
Reset to default -1the following solution works: setName(fileTitle) works
本文标签: How to set a pdf file namename taken from the spreadsheet cell apps scriptStack Overflow
版权声明:本文标题:How to set a pdf file name - name taken from the spreadsheet cell- apps script - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736561790a1944654.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
htmlBody
, what is yourhtmlBody
? – Jats PPG Commented 11 hours agoi
variable. You might as well add that as well as the definition of yourss
variable as the error might be there. Please read this article to know more about the reason why it is required for you to clearly define your code snippet. – PatrickdC Commented 11 hours ago