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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfheader/cfcontent IE vs Firefox

Status
Not open for further replies.

EdGioja

Programmer
Nov 6, 2003
39
0
0
US
I've been looking for an answer for quite some time.

I'm creating output that I want to have open in Excel. I'm using CFHEADER and CFCONTENT. I've unchecked the browse in same window. I've verified the registry. I've verified the proper relationship in the the My Computer/File types.

Everything works find in Firefox, but IE simply dumps the data to the browser window.

I would be very appreciative for another lead to follow...

Here is my code (of course it looks better in a bigger screen):

<CFHEADER NAME="Content-Disposition" VALUE= "inline; filename=MotionAnalysis.xls">
<CFCONTENT TYPE="application/vnd.ms-excel">

<cfoutput>Analysis for the dates: #url.begdate# - #url.enddate#
#TabChar##TabChar##TabChar##TabChar##TabChar##TabChar##TabChar##TabChar##NewLine##NewLine#CaseNum#TabChar#Judge#TabChar#DocketNum#TabChar#Filed By#TabChar#Firm#TabChar#DateFiled#TabChar#MainDoc#TabChar#F Orders#TabChar#NF Orders#TabChar#other#TabChar#total#NewLine#</cfoutput>
<cfloop query="getoutput">
<cfoutput>#casenum##TabChar##judgename#
#TabChar##docketnum##TabChar##filedby##TabChar##Firm##TabChar##dateformat(datefiled,'mm/dd/yyyy')##TabChar##maindocs##TabChar#
#fillable##TabChar##nonfillable##TabChar##other##TabChar##totaldocs##NewLine#
</cfoutput>


Thank you in advance.
 
try either:
<cfcontent type="application/unknown">
or possibly even opening it in another window using target.

Vegans are friends, not food...
 
try this:
Code:
<cfquery name="getArtists" datasource="cfartgallery">
   SELECT artistId, firstname, lastname, address, city, state, postalcode, email
   FROM Artists
</cfquery>
<cfprocessingdirective suppresswhitespace="yes">
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<cfset tab=chr(9)>
<cfset carriage=chr(13)&chr(10)>
<cfcontent type="application/msexcel">
<cfheader name="Content-Disposition" value="filename=artists.xls">
<cfoutput>
first name#tab#last name#tab#email address#carriage#
<cfloop query="getArtists">
#firstName##tab##lastname##tab##email##carriage#
</cfloop>	
</cfoutput>
</cfprocessingdirective>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top