>- see footer for list info -< Hi Paul I think the only way round this is to ensure there is something in the query to define the order and then use an order by clause in the SQL.
hth mark -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Swingewood Sent: 28 October 2005 15:15 To: [email protected] Subject: [CF-Dev] Excel DataSource Order >- see footer for list info -< Does anyone know how I can retrieve the data from an excel datasource in the order they are on the spreadsheet. For some reason everything seems to come back alphabetically .... I have this .... <cfquery name="GetExcelSheet" datasource="cfpagesexcel"> SELECT * FROM [DataSheet$] IN 'c:\documents and settings\administrator\desktop\ExcelDataSource.xls' 'EXCEL 5.0;' </cfquery> <!--- <cfdump var="#testQuery#"> ---> <!--- Get the number of columns and records to build our grid ---> <CFSET Columns = ListLen(GetExcelSheet.ColumnList)> <CFSET Records = GetExcelSheet.RecordCount> <!--- Output the data ---> <CFLOOP FROM="1" TO="#Columns#" INDEX="x"> <cfset ColumnHeader[x] = ListGetAt(getExcelSheet.ColumnList, x)> </CFLOOP> <CFLOOP FROM="1" TO="#Columns#" INDEX="x"> <table border=1> <tr> <td> <cfoutput>#ColumnHeader[x]#</cfoutput> </td> </tr> </table> </cfloop> _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help >-< _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
