簡體   English   中英

如何讀取應用腳本項目中的另一個文件?

[英]How do i read another file inside the app script project?

我的項目中有這個 email_template.html 文件,但我不知道如何訪問它。 我想將內容作為字符串讀取,以便解析它。

在此處輸入圖像描述

你可以得到 html 作為這樣的字符串:

const template = HtmlService.createTemplateFromFile("email_template");
const htmlOutput = template.evaluate();
const contentString = htmlOutput.getContent();
Logger.log(contentString);

然后你可以解析 contentString。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM