Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): James Gram / James Gram (James Gram)
Created: 04/27/2016
Components: Documentation, General
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / All users will encounter
Locale/System: English / Win 2012 Server x64
Vote Count: 0
Problem Description: Using spreadsheetaddrows with the includecolumnnames parameter throws an error indicating that the function only accepts 2 to 6 parameters. The documentation shows 7. Your example shows:
spreadsheetAddRows(xlobj, qry_data,1,1,"true",datatype,true);
Steps to Reproduce:
<cfscript>
out_fl = "#expandpath("./")#header.xlsx";
xlobj = SpreadsheetNew("2d_arr_data", true);
qry_data = queryNew("product, customer, qtr");
queryAddRow(qry_data, {product:"aniseed syrup", customer="annie", qtr="1"});
queryAddRow(qry_data, {product:"camembert pierrot", customer="pierre", qtr="2"});
queryAddRow(qry_data, {product:"scones", customer="connie", qtr="4"});
datatype = [""];
spreadsheetAddRows(xlobj, qry_data,1,1,"true",datatype,true);
cfspreadsheet(action="write", filename="#out_fl#", name="xlobj", overwrite=true);
cfspreadsheet(action="read", src="#out_fl#", query="qryxl");
writeDump(qryxl);
</cfscript>
Actual Result: Parameter validation error for the SPREADSHEETADDROWS function.The function accepts 2 to 6 parameters.
Expected Result: column names from the query should populate the header row in the spreadsheet
Any Workarounds: Separately adding a single row as row 1 containing each of the column names
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4145870
External Customer Info:
External Company:
External Customer Name: James Gram
External Customer Email:
External Test Config: My Hardware and Environment details: HP VM running WIN Server 2012 R2
Attachments:
Comments: