I have an export for excel button, using the code below. The problem
is that dates aren't formatted as dates and I'd like to correct
that. The first step would be to find out what type of field I am
working with. I am don't know how to do that.
Then I'll have to figure out how to make it a date field for excel.
Any comments are welcome - thanks!
<cfsetting showdebugoutput="No">
<cfoutput>
<cfheader name="Content-Disposition" value="inline;
filename=#db_table#.xls">
</cfoutput>
<cfcontent type="application/msexcel">
<cfset column_ar = listToArray(retrieved_data.columnlist)>
<table border="1" cellspacing="0" cellpadding="0">
<tr>
<cfset column_ar = listToArray(retrieved_data.columnlist)>
<cfloop from="1" to="#arrayLen(column_ar)#" index="ii">
<cfset content = column_ar[ii]>
<td bgcolor="##CBE4F4"><cfoutput>#content#</cfoutput></td>
</cfloop>
</tr>
<cfoutput query="retrieved_data">
<tr>
<cfloop list="#retrieved_data.columnlist#" index="col">
<cfset content = retrieved_data[col][currentRow]>
<td>#content#</td>
</cfloop>
</tr>
</cfoutput>
</table>
--
Daniel Kessler
College of Health and Human Performance
University of Maryland
Suite 2387 Valley Drive
College Park, MD 20742-2611
Phone: 301-405-2545
http://hhp.umd.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263132
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4