Answered
CFCONTENT Problem
I am using CFCONTENT to display an Excel file after a person
clicks on the row in CFGRID. The code below is the code I am using:
<cfset filePath = "d:\Inetpub\OpptyAttachments\#getReport.oppID#\#trim(getReport.attachName)#">
<cfset apptype = #Right(getReport.attachName, 3)#>
<CFHEADER NAME="content-disposition" VALUE="inline; filename=#Trim(getReport.attachName)#">
<cfif (apptype IS 'xls') or (apptype IS 'csv')>
<cfcontent type="application/vnd.ms-excel" file="#Trim(filePath)#" deletefile="No">
</cfif>
When I try to open the Excel file I get the following error in IE:
Action canceled
Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable.
If I refresh the browser the file dialoge box opens up.
This error is just for Excel files, I am not having this problem with text, pdf or images.
Any suggestions would be helpful!
<cfset filePath = "d:\Inetpub\OpptyAttachments\#getReport.oppID#\#trim(getReport.attachName)#">
<cfset apptype = #Right(getReport.attachName, 3)#>
<CFHEADER NAME="content-disposition" VALUE="inline; filename=#Trim(getReport.attachName)#">
<cfif (apptype IS 'xls') or (apptype IS 'csv')>
<cfcontent type="application/vnd.ms-excel" file="#Trim(filePath)#" deletefile="No">
</cfif>
When I try to open the Excel file I get the following error in IE:
Action canceled
Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable.
If I refresh the browser the file dialoge box opens up.
This error is just for Excel files, I am not having this problem with text, pdf or images.
Any suggestions would be helpful!
