This is the exact code that now works perfectly!!!! - Thank
you so much - I was really stuck on trying to do the order in the
order by clause of the query, which was totaly wrong - cool to have
cfloop list do all of the ordering.
<body>
<cfquery name="getColumns" datasource=".........">
SELECT Column_Name
FROM INFORMATION_SCHEMA.Columns
WHERE Table_Name = 'Fields'
AND Table_Catalog = '......'
</cfquery>
<cfquery name="getData" datasource="........">
SELECT #ValueList(getColumns.Column_Name)#
FROM Fields
</cfquery>
<cfset variables.columnNames =
ValueList(getColumns.Column_Name)>
<table border="0" cellspacing="0" cellpadding="0">
<TR><CFOUTPUT QUERY="GetColumns">
<TD>#column_Name#</TD>
</CFOUTPUT></TR>
<cfoutput query="getData">
<tr><cfloop list="#variables.ColumnNames#"
index="columnName">
<td>#getData[columnName][currentRow]#</td>
</cfloop>
</tr>
</cfoutput>
</table>
</body>
</html>
<cfheader
name="Content-Type"
value="application/ms-excel">
<cfheader
name="Content-Disposition"
value="attachment; filename=Report.xls">