【发布时间】:2021-03-18 07:44:32
【问题描述】:
我需要 Apps 脚本方面的专业人员的帮助。我有由 web-app 实现的项目。 我在服务器部分写了脚本
var url = "https://docs.google.com/spreadsheets/d/1s8l-8N8dI-GGJi_mmYs2f_88VBcnzWfv3YHgk1HvIh0/edit?usp=sharing";
var sprSRCH = SpreadsheetApp.openByUrl(url);
let sheetSRCHSSCC = sprSRCH.getSheetByName("PUTAWAY_TO");
function GetQ(){
var QPLAN = sheetSRCHSSCC.getRange("M2:M").getValues().filter(String).length;
var myArray = sheetSRCHSSCC.getRange("O2:O" + (QPLAN + 1)).getValues();
var QFACT = 0;
for (i = 0; i < myArray.length; i++) {
if (myArray[i] != "") {
QFACT += 1
}
}
}
I need to return values from this function to inputs:
QFACT to FACT
QPLAN to PLAN
<div class="input-field col s3">
<input disabled value="" id="PLAN" type="text" >
<label for="disabled">PLAN</label>
</div>
<div class="input-field col s3">
<input disabled value="" id="FACT" type="text" >
<label for="disabled">FACT</label>
</div>
我将不胜感激。我是新手))
【问题讨论】:
-
你可以使用模板化的html
-
什么意思?看起来怎么样?
-
它会在呈现 html 之前在评估方法服务器端加载您想要的数据。转到文档搜索并输入模板化的 html
标签: google-apps-script web-applications