1 / 7

Exporting to Excel with ColdFusion

In five easy steps... . First link from the calling page. <A HREF="rpt_ViewCustExcel.cfm" TARGET="rpt_ViewCustExcel"><b>EXCEL</b></A>. Second build the query. <CFQUERY NAME="FetchCustomerExcel" DATASOURCE="

dora
Télécharger la présentation

Exporting to Excel with ColdFusion

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Exporting to Excel with ColdFusion By Rick Mason, SeedChoices.com

    2. In five easy steps..

    3. First link from the calling page <A HREF="rpt_ViewCustExcel.cfm" TARGET="rpt_ViewCustExcel"> <b>EXCEL</b></A>

    4. Second build the query <CFQUERY NAME="FetchCustomerExcel" DATASOURCE="#S.db_Datasource#"> SELECT Customers.FName, Customers.LName, Customers.Address, Customers.City, Customers.State FROM Customers ORDER BY Customers.LName, Customers.FName </cfquery>

    5. Third call Excel using cfcontent <cfcontent type="application/vnd.ms-excel">

    6. Fourth create the headers <cfoutput> First_name#chr(9)# Last_name#chr(9)#Address#chr(9)# City#chr(9)#State#chr(13)# </cfoutput>

    7. Fifth send the data <cfoutput query="FetchCustomerExcel"> #fname##chr(9)##lname##chr(9)# #Address##chr(9)##City##chr(9)##State# #chr(13)# </cfoutput>

More Related