需要格式化列c,e和其他几个以使用以下格式显示日期:
2014年7月4日
无法解决如何做到这一点...谷歌脚本新!
我有这个用 google 应用程序脚本编写的 HTML(称为 form.html)创建的表单,我还有一个样式表(CSS)来配合它。当我将 CSS 放在与表单相同的 HTML 文件中时,一切都运行良好。但是,如果我想将样式表放在单独的 HTML 文件(称为 Stylesheet.html)中,然后使用脚本将其包含在 form.html 中
<?!= HtmlService.createHtmlOutputFromFile('Stylesheet').getContent(); ?>
Run Code Online (Sandbox Code Playgroud)
甚至创建一个“包含”函数:
function include(filename) {
return HtmlService.createHtmlOutputFromFile(filename)
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
.getContent();
}
Run Code Online (Sandbox Code Playgroud)
然后在 form.html
<?!= include(Stylesheet) ?>
Run Code Online (Sandbox Code Playgroud)
..它似乎不起作用。更糟糕的是,scriplet 出现在表单上。也许我忽略了一些基本的东西,但我无法理解这一点。有任何想法吗 ?
这是到目前为止的代码......
<?!= HtmlService.createHtmlOutputFromFile('Stylesheet').getContent(); ?>
Run Code Online (Sandbox Code Playgroud)
function include(filename) {
return HtmlService.createHtmlOutputFromFile(filename)
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
.getContent();
}
Run Code Online (Sandbox Code Playgroud)
<?!= include(Stylesheet) ?>
Run Code Online (Sandbox Code Playgroud)
用CSS结果IN的form.html

这是单独的 .html 文件中的 CSS 并包含在 form.html 中
<?!= HtmlService.createHtmlOutputFromFile('Stylesheet').getContent(); ?>
Run Code Online (Sandbox Code Playgroud)
