tracker issue : CF-4145870

select a category, or use search below
(searches all categories and all time range)
Title:

SPREADSHEETADDROWS PARAMETER COUNT ERROR

| View in Tracker

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:

James, Thanks for pointing this out. The 7th parameter ("includeColumnNames") is was introduced with CF2016. This option is not available with CF11. We will fix the documentation.
Comment by Piyush K.
3004 | May 03, 2016 08:22:54 AM GMT
can we change : Adobe ColdFusion (2016 release): Added the includeColumnNames attribute. This attribute works only in the 2016 release. to: ColdFusion (2016 release): Added the includeColumnNames attribute. The second line is implied and is hence redundant.
Comment by Piyush K.
3005 | May 26, 2016 03:43:03 AM GMT