cfspreadsheet 参数验证错误
cfspreadsheet Parameter validation error
我正在尝试使用 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 )#">
如有任何帮助,我们将不胜感激。
直到 CF11 才添加 datatype
(字符串,数字)参数,并在历史记录下的 adobe docs 中引用。如果您尝试在 CF9 和 CF10 中包含数据类型,您将收到验证错误。
您可以在 CF11 中看到您的示例在 TryCF.com 上工作。
我正在尝试使用 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 )#">
如有任何帮助,我们将不胜感激。
直到 CF11 才添加 datatype
(字符串,数字)参数,并在历史记录下的 adobe docs 中引用。如果您尝试在 CF9 和 CF10 中包含数据类型,您将收到验证错误。
您可以在 CF11 中看到您的示例在 TryCF.com 上工作。