1
[16-09-16 14:10:03:391 CDT] Starting execution
[16-09-16 14:10:03:398 CDT] HtmlService.createTemplateFromFile([Index]) [0.001 seconds]
[16-09-16 14:10:03:399 CDT] Function.apply([[]]) [0 seconds]
[16-09-16 14:10:03:401 CDT] Execution failed: SyntaxError: Missing) in parenthetical. (line 2, file "Code") [0.004 seconds total runtime]
這就是執行記錄。我有幾個其他的谷歌網站運行類似的腳本沒有問題。實際上,大多數Code.gs都是相同的,只是在被調用的數據中有細微的差異。我的問題似乎是在這個特定的應用程序腳本項目的doGet函數中。doGet()在括號中缺少')'
本質上,我在谷歌網站內爲我的公司建立了一個內聯網,他們喜歡在電子表格中保留大量東西,因此我正在從這些數據構建網頁。 Code.gs ~~~~
function doGet() {
return HtmlService
.createTemplateFromFile('Index')
.evaluate();
}
function include(filename) {
return HtmlService.createHtmlOutputFromFile(filename)
.getContent();
}
function getMisc(){
return SpreadsheetApp
.openById('1sORbt2nn3a5-NV_aR3CmmGCwYac-9ASmNrRySmOlBC4')
.getSheetByName("MiscSuppliers")
.getDataRange()
.getValues();
}
的Index.html ~~~~
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<style>
<?!= include('StyleSheet'); ?>
</style>
</head>
<body>
<table class="table2">
<? var info = getInfo() ?>
<? var files = getInfo() ?>
<? var login = getInfo() ?>
<tr>
<td>
<? for (var i = 0; i < info.length; i++) { ?>
<?= info[i][0] ?>
<? } ?>
</td>
<td>
<?= files[0][0] ?>
</td>
<td>
<? for (var i = 0; i < login.length; i++) ?>
<?= login[i][0] ?>
<? } ?>
</td>
</tr>
</table>
doGets我所有的代碼都是相同的。任何分支的原因,這一個不工作?道歉編輯不好或質詢不好。
謝謝,啞錯誤在我的部分。是爲了解決所有潛在問題而在兔子洞裏走下坡路。感謝幫助ocordova。 – Odin