tracker issue : CF-3825042

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

CFSpreadsheet action=read headerrow=1 fails if a column name contains a comma. [ this fails when dumping the spreadsheet object created with the cfspreadsheetread ]

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Tuttle / Adam Tuttle (Adam Tuttle)

Created: 09/15/2014

Components: Debugging, CFDump

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Platforms All

Vote Count: 4

Problem Description:

Spreadsheets from non-technical users often have things like commas in the column headings. CFSpreadsheet throws an exception trying to read these sheets because it is using a comma-delimited list internally and a single distinct column then appears as two in the list (column "a, b" appears to be separate columns "a", "b")

Steps to Reproduce:

<cfspreadsheet action="read" src="somefile.xlsx" headerrow="1" />

Where somefile.xlsx contains a value with a comma in it on row 1.

Actual Result:

Exception thrown

Expected Result:

Full column name, with commas, appears in the result query

Any Workarounds:

Rename the column before importing the spreadsheet, which can not be done easily using cfspreadsheet since it can't read the file.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3825042

External Customer Info:
External Company:  
External Customer Name: Adam Tuttle
External Customer Email:  
External Test Config: My Hardware and Environment details:



OSX 10.9.4

Java 1.7.0_60

Attachments:

Comments:

Adobe, you seriously need to stop using strings with commas in them as some sort of collection type. It's bloody moronic. And causes stuff like this to happen. Sort it out. -- (the late) Adam
Vote by External U.
10901 | September 16, 2014 07:01:23 AM GMT
In honor of the late great Adam Cameron, please count my vote as a +1
Comment by External U.
10892 | September 16, 2014 07:08:20 AM GMT
In honor of the late great Adam Cameron, please count my vote as a +1
Vote by External U.
10902 | September 16, 2014 07:08:44 AM GMT
Definitely needs to be addressed in all facets of cfspreadsheet.
Vote by External U.
10903 | September 16, 2014 10:08:15 AM GMT
unable to observe the exact issue mentioned in the description (using CF11 update13). cfspreadsheet tag does not seem to throw any exceptions when reading or writing spreadsheets with comma(s) in column headers. @Adam, are you getting that exception when reading the excel file with the tag, or when trying to manipulate the query generated by the tag. In case of the former, please share the stack trace. <cfset src_fl = "#expandpath("./")#headers_skewed.xlsx"> <cfspreadsheet action="read" src="#src_fl#" headerrow="1" query="qxls"> <cfspreadsheet action="read" src="#src_fl#" headerrow="1" name="xls_obj"> <!--- <cfloop from=1 to="#qxls.recordcount#" index="r"> <cfloop list="#qxls.columnList#" index="col"> <cfoutput>#qxls[col][r]#, </cfoutput> </cfloop> <br> </cfloop> ---> <cfspreadsheet action="write" filename="#expandpath("./")#neo_q_xl.xlsx" query="qxls" overwrite="true"> <cfspreadsheet action="write" filename="#expandpath("./")#neo_xl_obj.xlsx" name="xls_obj" overwrite="true">
Comment by Piyush K.
10893 | September 16, 2014 01:25:56 PM GMT
I am testing on CF10 (which is still in support, as far as I know). Here's the stacktrace: https://gist.github.com/atuttle/eec10879d7042c040a21
Comment by External U.
10894 | September 16, 2014 01:54:35 PM GMT
looks like you are using the cfdump tag somewhere. excerpt from your stack trace:. cfdump2ecfm1568701689$funcDUMPQUERY.runFunction(E:\cf10_final\cfusion\wwwroot\WEB-INF\cftags\dump.cfm:2180) So, it looks like cfdump breaks when called on to dump such a query. This is something I noticed, as well, when trying to reproduce this issue. But, I did not observe any issues with spreadsheet manipulation tags. Can you pls. check your code and dispense with cfdump? or perhaps you can share the relevant code.
Comment by Piyush K.
10895 | September 18, 2014 03:16:52 AM GMT
It seems you're correct. Removing the dump does resolve the reported issue that cfspreadsheet can't read the file. Please consider this a request to edit the bug to state that spreadsheets with commas in column names can not be dumped.
Comment by External U.
10896 | September 18, 2014 07:17:08 AM GMT
" This is something I noticed, as well, when trying to reproduce this issue." Did you raise a bug for this, Piyush? -- Adam
Comment by External U.
10897 | September 18, 2014 07:40:18 AM GMT
Adam T, I'm re-orienting this bug's area from document/spreadsheet to "debugging" for reasons noted in my previous comment. In case you are experiencing an issue with a spreadsheet related tag, please revert with the relevant code extract. Adam C, we can raise a separate bug if we happen to be dealing with two separate issues here. The cause is yet to be investigated and, incidentally, I don't see this issue with CF11. Thanks All.
Comment by Piyush K.
10898 | September 20, 2014 07:00:08 AM GMT
+1 I remember having similar problems with "unconventional" column heading naming in user-provided spreadsheets in CF 10. I think commas were not the only problematic character. Please try to make this as foolproof as possible.
Vote by External U.
10904 | October 02, 2014 08:12:20 PM GMT
This is fixed in CF11. We may take this up in a future CF10 update.
Comment by Piyush K.
10899 | December 05, 2014 02:04:36 AM GMT
This is a bug in cfdump and is fixed in CF 11.
Comment by Vamseekrishna N.
10900 | April 23, 2015 01:04:21 AM GMT