freelanceprogrammers.org Forum Index » Cold Fusion
Dynamic data sources for Excel in ColdFusion MX
Joined: 26 Mar 2005
Posts: 5
Dynamic data sources for Excel in ColdFusion MX
I am trying to connect an Excel file. I have tried
http://www.emerle.net/programming/display.cfm/t/cfx_excel2query, but
it does not work for me. Is there another way to connect to Excel
files on the CF Server?
tia
Joined: 10 Sep 2002
Posts: 9
Dynamic data sources for Excel in ColdFusion MX
This is from:
http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20980769.htm
l
Here is how to do that :
In CF 5 there should be an option of `Excel` when you define a data source.
In CFMX since it uses JDBC you must first create a system ODBC connection,
then in CFMX set it up as an ODBC bridge connection. One that is in place
you can query the excel file like this:
<cfquery name="queryname" datasource="excelDSN">
select * from `sheet1$`
</cfquery>
A quirky thing is that the quotes around the sheet name MUST BE LIKE THIS: `
and NOT LIKE THIS: `
setup a MS Access datasource (doesn`t matter if it has any tables)
<cfquery name="qryXLSdata" datasource="myAccessPassthrough">
SELECT *
FROM [Sheet1$]
IN `c:path ofile.xls` `EXCEL 5.0;`
</cfquery>
this is a pretty good work around for the lack of dynamic connect strings in
CFMX. it works for other file types as well... CSV, DBF, XLS, MDB
-----Original Message-----
From: cold_fusion@yahoogroups.com [mailto:cold_fusion@yahoogroups.com] On
Behalf Of Daniel Kang
Sent: Wednesday, May 04, 2005 10:12 PM
To: cold_fusion@yahoogroups.com
Subject: [cold_fusion] Dynamic data sources for Excel in ColdFusion MX
I am trying to connect an Excel file. I have tried
http://www.emerle.net/programming/display.cfm/t/cfx_excel2query, but
it does not work for me. Is there another way to connect to Excel
files on the CF Server?
tia
Yahoo! Groups Links
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







