gpt4 book ai didi

coldfusion - cfspreadsheet 参数验证错误

转载 作者:行者123 更新时间:2023-12-03 10:00:42 27 4
gpt4 key购买 nike

我正在尝试使用 cfspreadsheet 获取一个基本示例。但这是我收到的错误:

Parameter validation error for the SPREADSHEETSETCELLVALUE function.

代码

<cfset objSpreadsheet = SpreadsheetNew()>

<!--- Create and format the header row. --->
<cfset SpreadsheetAddRow( objSpreadsheet, "Location,Percent of Total Checklists,Location Total" )>
<cfset SpreadsheetFormatRow( objSpreadsheet, {bold=true, alignment="center"}, 1 )>

<!--- Populate the spreadsheet. --->
<cfset SpreadsheetSetCellValue( objSpreadsheet, 'FSC', 2, 1, "String" ) >
<cfset SpreadsheetSetCellValue( objSpreadsheet, .03, 2, 2, "Numeric" ) >
<cfset SpreadsheetSetCellValue( objSpreadsheet, 13, 2, 3, "Numeric" ) >
<cfset SpreadsheetSetCellValue( objSpreadsheet, 'OPERATIONS', 3, 1, "String" ) >
<cfset SpreadsheetSetCellValue( objSpreadsheet, 13.78, 3, 2, "Numeric" ) >
<cfset SpreadsheetSetCellValue( objSpreadsheet, 5161, 3, 3, "Numeric" ) >


<cfheader name="Content-Disposition" value="attachment; filename=LS_#Dateformat(NOW(),'MMDDYYYY')#">
<cfcontent type="application/vnd.ms-excel" variable="#SpreadsheetReadBinary( objSpreadsheet )#">

如有任何帮助,我们将不胜感激。

最佳答案

datatype (String, Numeric) 参数直到 CF11 才添加,并在 adobe docs 中引用历史之下。如果您尝试在 CF9 和 CF10 中包含数据类型,您将收到验证错误。

您可以在 TryCF.com 上看到您的示例在 CF11 中。

关于coldfusion - cfspreadsheet 参数验证错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46917417/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com