Skip to main content
Oct 26, 2010 3:25 AM UTC
Question

Excel Database

Is it possible to use a Microsoft Excel file to store data using Coldfusion? How do you take data stored in an Apache Derby Embedded database and put it in a comma delimited format to be exported into an Excel or Access file?

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Inspiring
Oct 26, 2010 6:19 PM UTC

Are you trying to say you want to export data from your database and put it into an XLS file?  I think that's what you're trying to say.

The answer kinda relies on knowing what version of CF you are using.  CF9 has native XLS support built in, in the shape of various functions:

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS890819DC-DE4D-4b24-A237-6E3483E9D6A1.html

As well as <cfspreadsheet> and the like.

If you're on CF8 or earlier, perhaps have a look @ Apache POI:

http://poi.apache.org/spreadsheet/index.html

--

Adam

Translate
Legend
Oct 27, 2010 12:38 AM UTC

Reading the question again perhaps I understand it differently this time. Maybe  want to do this from Ben Forta blog:

<cfspreadsheet action="read" src="Sales.xls" query="myQuery"> <cfdump var="#myQuery#">

more detail here:

http://www.adobe.com/devnet/coldfusion/articles/coldfusion9_whatsnew.html

HTH again, Carl.

Translate
Legend
Oct 26, 2010 4:06 AM UTC

Hello,

Have not used MS Excel as a database. What you would need is an MS Excel JDBC type4 driver. In CFadmin UI select Data & Services > Data Sources then Add New Data Source and use Driver other. Put in the JDBC URL and Driver Class to match the details of the type4 driver file. You will need to add the JAR file that is the JDBC driver to the JVM arguments path (or via ColdFusion Class Path).

HTH, Carl.

Translate