I don't remember if you posted any code, but I get by this with the
following:

<cfset Variables.contVal = "inline;filename=#Variables.myFileName#" />
<cfheader value="#Variables.contVal#" name="content-disposition">
<cfcontent type="#Variables.myType#" reset="Yes"
variable="#Variables.mySpreadsheetVar#">

Before All that I build the spreadsheet and put it into
Variables.mySpreadsheetVar. 

What version of CF are you on? Are you using HTML, CFSpreadsheet, or
some other method to generate the spreadsheet? 

I had an issue similar to what you had before, but I started building
the spreadsheets using POI then when they get pushed to the browser they
are in true spreadsheet format instead of html pretending to be xls (or
xlsx).

Sometimes the browser would see the xls extension but would then check
the content and see html and act weirdly. By using the poi I not only
get rid of those problems but it also got rid of the Excel "Not in the
same format" popup.

If you can consider this option let me know and I may be able to help a
little.  Also, do you have access to the server itself? I upgraded the
POI that comes with ColdFusion to the latest version and I can do a lot
more extra stuff.

Steve


-----Original Message-----
From: Robert Gallagher [mailto:[email protected]] 
Sent: Tuesday, November 09, 2010 5:35 PM
To: cf-talk
Subject: Re: cfheader/cfheader not working as expected


I truly understand what you're saying but how these things work it not
consistent which is frustrating.  What's really crazy is we have dozens
of Excel download links in our various apps like this example and some
work perfectly with "value=inline" but most have the undesirable
behavior (code name and read-only) which actually still works.  

Why "inline" provides the dialog box option of remembering the download
decision but using "attachment" does not give that option (at least in
IE) is very inconsistent but not surprising.  Since this is not earth
shattering I will chalk this up to browser inconsistency and move on.  



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339075
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to