tracker issue : CF-3588818

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

cfspreadsheet drops empty columns from query even though headerrow column names are present in XLS file

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Paul Erickson / Paul Erickson (Paul Erickson)

Created: 07/02/2013

Components: Document Management, Office Integration

Versions: 10.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: 9.0.1 / 287309

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2003 Server

Vote Count: 0

Problem Description:
I provide an excel template to my customer to facilitate a standard format for uploading data to our system.  Each cell in row 1 (the "header row") of the spreadsheet specifies the names of each column required for the input data.  Even though a header row column is specified, if the cells below it are empty, cfspreadsheet will not include that column in the query results.

Steps to Reproduce:
Create an excel sheet:
row 1: last_name, first_name, company
row 2: smith, joe,
row 3: doe, john,

Leave the cells empty under "company"

To import the data:
<cfspreadsheet action="read" src="myfile.xls" query="impData" headerrow="1" excludeheaderrow="true">

Actual Result:
Query returns only columns named "last_name" and "first_name"

Expected Result:
Query should have returned all columns, i.e.  "last_name","first_name","company"

Any Workarounds:
Add the columns= parameter to the cfspreadsheet tag, and the empty columns will be returned in the query.  Using the above example, the following returns the correct results:
<cfspreadsheet action="read" src="myfile.xls" query="impData" headerrow="1" excludeheaderrow="true" columns="1-3">

Note that using the columnnames= parameter exhibits the same buggy behavior.

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

Watson Bug ID:	3588818

Deployment Phase:	Release Candidate

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



CF 9,0,1,274733

hf901-00010.jar

Java 1.7.0_25

Windows Server 2003 32-bit

Attachments:

Comments:

This is fixed in the upcoming release of CF.
Comment by Piyush K.
15066 | January 07, 2014 11:47:02 PM GMT