I'm trying to add the headers in an .xls file created from my query. I
get all the data from the query but how do I add the column headers in
the Excel spreadsheet?
Also, my data is output on every other line of the spreadsheet. Only
the "even" numbers of the spreadsheet have data.
Can anyone help?
<cfset todayDate = #Now()#>
<cfset saveDate = #DateFormat(todayDate,('yymmdd'))#>
<cfset saveTime = #TimeFormat(todayDate,('HHmm'))#>
<CFSETTING ENABLECFOUTPUTONLY="yes">
<CFSET TAB=CHR(9)>
<CFQUERY NAME="get_Data" DATASOURCE="mydatasource">
SELECT Name_Last, Name_First, Group_Company,
FROM data
ORDER by Name_Last, Name_First
</CFQUERY>
<CFHEADER NAME="Content-Disposition" VALUE="inline;
filename=savedfile-#saveDate#-#saveTime#.xls">
<CFCONTENT TYPE="application/msexcel">
<CFOUTPUT QUERY="get Data">
#Name_First##TAB##Name_Last##TAB##Group_Company#
</CFOUTPUT>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Stay Ahead of Hackers - Download ZoneAlarm Pro
http://www.houseoffusion.com/banners/view.cfm?bannerid=65
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190544
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54