onaled777
asked on
Opening an excel file in ColdFusion 8
With the code below I am attempting to open an excel file when the submit button of a form is pressed by I keep getting a page with the following on the first line:
'); } } function writeCloseBody() { if( debugMode ) { document.write('
Can someone show me how to correct this?
'); } } function writeCloseBody() { if( debugMode ) { document.write('
Can someone show me how to correct this?
<cfsetting enablecfoutputonly="Yes">
<cfparam name="publisher">
<cfparam name="productcode">
<cfparam name="campaign">
<cfparam name="cpa">
<cfparam name="exiturl">
<cfparam name="MOJOCreativeID">
<cfparam name="MOJOPlacementID">
<cfparam name="PageID">
<cfparam name="PageWght">
<cfparam name="CampaignCount">
<cfif isDefined("Form")>
<cfset publisher = Form.publisher>
<cfset product_code = Form.productcode>
<cfset campaign_name = Form.campaign>
<cfset cpa = Form.cpa>
<cfset exit_url = Form.exiturl>
</cfif>
<cfcontent type="application/msexcel">
<cfheader name="Content-Disposition" value="filename=BulkCampExcel.xls">
<cfoutput>
<table cols="2">
<tr>
<th>publisher</th>
<th>product_code</th>
<th>campaign_name</th>
<th>cpa</th>
<th>exit_url</th>
<th>MOJOCreativeID</th>
<th>MOJOPlacementID</th>
<th>PageID</th>
<th>PageWght</th>
</tr>
<cfloop index = "LoopCount" from = "1" to = "#CampaignCount#">
<tr>
<td>#publisher#</td>
<td>#productcode#</td>
<td>#campaign#</td>
<td>#cpa#</td>
<td>#exiturl#</td>
<td>#MOJOCreativeID#</td>
<td>#MOJOPlacementID#</td>
<td>#PageID#</td>
<td>#PageWght#</td>
</tr>
</cfloop>
</table>
</cfoutput>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1046440