Status/Resolution/Reason: Closed/Won't Fix/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 09/08/2015
Components: Document Management, Office Integration
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 1
Problem Description:
The addRows() method treat commas as column delimiters, not as data.
See repro case below
One can pass an array of data in to addRows(), but instead of this being an array of arrays, its an array of comma-delimited lists. So it's not possible to insert data values with commas in them.
Any functionality in CFML which accepts a list, must also accept a delimiter. It is a bug to not do so, as it doesn't follow the Principle of Least Astonishment (https://en.wikipedia.org/wiki/Principle_of_least_astonishment)
And *this* function should accept an array of arrays (although that's a feature req, I get that).
Steps to Reproduce:
<cfscript>
spreadsheet = spreadsheetNew();
data = [
"tahi",
"rua",
"toru,wha", // this is one data value
"rima,ono" // so is this
];
filePath= expandPath("./withArray.xls");
spreadsheet.addRows(data,1,1);
spreadsheet.write(filePath, true);
</cfscript>
Actual Result:
"wha" ends up in B3
"ono" ends up in B4
Expected Result:
A3's value should be "toru,wha"
A4's value should be "rima,ono"
And, yes I know I can use a query. That's beside the point: I have an array, and this thing is supposed to work with arrays.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4051598
External Customer Info:
External Company:
External Customer Name: Adam Cameron
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: