EasyCFM.COM ColdFusion Forums / Coding Help! / xport from Accss to Excel via a link

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: xport from Accss to Excel via a link

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

beginner
11-14-2002 @ 8:57 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 2
Joined: Nov 2002

Hi can someone help me I am a beginner in coldfusion. I am attempting to have an option for the user to view data in an excel sheet via a hyperlink, using access 97 as the DB, currently they have the data as html coming from the DB using a cfquery.

Thanks for your help.

TRying my best to learn!

Webmaster
11-14-2002 @ 10:36 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

I suggest you make it a .CSV (Comma Delimmited File)..


You can do it like this:


<!--- Define the name of the file --->
<cfset filename = "#membername#.csv">
<!--- First Define the fileds in the file --->
   <cffile action="append"
           file="#filename#"
           output="First Name,LastName,Email,Phone">

<!--- Now go throught and export the links one by one --->
<cfoutput query="YourQuery">
   <cffile action="append"
           file="#filename#"
           output="#fname#,#lname#,#email#,#phone#">

</cfoutput>


That will generate an excel comma delimited file, that opens in excel.

Your other option is to use COM objects, you can get more information on that here:
http://www.cfcomet.com

Hope this helps, Smile

Thanks,
Pablo Varando
EasyCFM.COM, LLC.

This message was edited by Webmaster on 11-14-02 @ 10:37 AM

beginner
11-15-2002 @ 8:44 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 2
Joined: Nov 2002

Thank you for your response. I will try it.

beginner >:O)

TRying my best to learn!


Website Designed and Developed by Pablo Varando.