Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel file not forcing a download cfcontent

Status
Not open for further replies.

countdrak

Programmer
Jun 20, 2003
358
US
I am using cfcontent to display my file. I wanna force the use r to download the file as xls. But the file keeps opening up in the IE. In firefox it works fine.

Help?

here is the code

Code:
<cfheader name="Content-Disposition" value="filename=test.xls">
<cfcontent type="application/msexcel">

then i have my querys and html

Thanks guys.
 
whenever I've done something like this i've used this:

Code:
<cfcontent type="application/unknown">

otherwise you are invokeing the browsers known mime types, and ie knows that it can open a xls file

Hope this helps!

Tony
 
Try adding a file path in the cfcontent tag
<cfcontent type="text/msexcel" file="fullPathtoTheFile.xls">

----------------------------------
htower
if( !succeed ) try( );
 
Had to open the file in a new window! That fixed it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top