我有下面的代碼,它顯示完全正常,但一直拋出錯誤:「方法spreadsheetAddRow的結果無法分配,因爲它不返回值「這個錯誤發生在我添加標題的那一行。沒有什麼看起來不合適,廣泛的谷歌搜索沒有幫助找到任何有類似錯誤的人。希望社區能夠幫助!方法spreadsheetAddRow的結果無法分配,因爲它不返回值
<cfset newSheet = spreadsheetNew('Need Approval')>
<cfset headerRow = spreadsheetAddRow(newSheet,'ContactID,FirstName,LastName,Organization,RegisterDate,Approve,Deny')>
<cfset i = 2>
<cfoutput query="getNotApproved">
<cfset newRow = spreadsheetAddRow(newSheet,'#ContactID#,#FirstName#,#LastName#,#Organization#,#RegisterDate#',#i#,1)>
<cfset addApprove = spreadsheetSetCellFormula(newSheet,"HYPERLINK(https://mysite/approvalStatus.cfm?sts=approved&cid=#ContactID#&udf=#getShowrooms.Showroom#,'Click here to Approve')",#i#,6)>
<cfset addDeny = spreadsheetSetCellFormula(newSheet,"HYPERLINK(https://mysite/approvalStatus.cfm?sts=deny&cid=#ContactID#&udf=#getShowrooms.Showroom#,'Click here to Deny')",#i#,7)>
<cfset i++>
</cfoutput>
要澄清,再看看[文檔](http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-67ad.html)。說明中說*「**返回**:不返回值。*」。注意這些例子不會嘗試捕獲任何結果?所以錯誤是因爲你試圖捕獲一個不存在的值。 – Leigh