【发布时间】:2020-05-12 04:28:03
【问题描述】:
我正在尝试将值“input1”传递给 HTML 对话框。看起来很简单。 . .感谢您的任何帮助。 代码.gs
function doGet() {
var ss = SpreadsheetApp.openByUrl(url);//Spreadsheet url
var ws = ss.getSheetByName("Options");
var tmp = HtmlService.createTemplateFromFile("page");
tmp.input1 = ws.getRange("A2").getValues();//cell valve is 01-01-2020
return tmp.evaluate();
}
page.html
<html>
<head>
</head>
<body>
<input value="<?!= input1;?>" type="text" >
</body>
</html>
它工作完美,但从单元格日期格式中获取价值是“2020 年 1 月 1 日星期三 12:30:00 GMT+0530(印度标准时间)”,但我想要不同的格式,如“2020 年 1 月 1 日”
【问题讨论】:
标签: google-apps-script google-sheets