dfwalton
Programmer
- Jul 24, 2002
- 143
I have a very wide table that describes jobs done by employees. Created a cool interface to select types of jobs, specific emps, date ranges, etc, and it all goes out to Excel.
Now the users want to be able to select specific columns to include, not all 55. So I set up checkboxes on the selection screen, and the SQL works fine: I create a select string that only includes the column names requested. My query looks like
It works great.
I have another string, #outList# to get the output from the query. It looks like: #region#,#empName#,#eventDate# ...etc
The part that fails looks like this:
What I get is a spreadheet with the correct column headings and #outlist# in every cell.
Any bright ideas out there? Thanks a million.
Now the users want to be able to select specific columns to include, not all 55. So I set up checkboxes on the selection screen, and the SQL works fine: I create a select string that only includes the column names requested. My query looks like
Code:
<cfquery...>Select #SelectList# from [where clause]...
I have another string, #outList# to get the output from the query. It looks like: #region#,#empName#,#eventDate# ...etc
The part that fails looks like this:
Code:
<cfsetting enablecfoutputonly="yes">
<CFSaveContent Variable="outText">
<cfoutput>#ColHeads# #crlf#</cfoutput>
<cfoutput query="EPDtoXLS">
#outlist#
</cfoutput>
</CFSAVECONTENT>
<cfcontent type="application/msexcel"> <!---WAS text/Tab-Delimited --->
<cfoutput>
<CFHEADer name="Content-Disposition" value="Filename=#Form.csvFilename#">
#outText#</cfoutput>
What I get is a spreadheet with the correct column headings and #outlist# in every cell.
Any bright ideas out there? Thanks a million.