Hello,
I have a question, and I hope you can help! I have a piece of code that generates HTML content (a simple table) via cfsavecontent and then gives it to the user using cfcontent en cfheader. Unfortunately, when the user directly opens the offered file (using "Open with Microsoft Excel)", Excel won't show the file. But when the user downloads the file and then opens it (the same file!), Excel opens it without a problem! Hope you can shed some light on this. My code is this:
<cfsavecontent variable="variables.outputFileContent"><table id="formulier"><tr><td><b>Geslacht</b></td><td><b>Aanhef 1</b></td></tr></table></cfsavecontent>
Obviously, I've cut out a large part of the coding itself. I've used comments to strip out the spaces (but that didn't change it either)... The file is presented using the following code:
<cfcontent type="application/application/vnd.ms-excel;" reset="yes" />
<cfheader name="Content-Disposition" value="inline;filename=exportfile_name_unique.xls" />
<cfoutput>#variables.outputFileContent#</cfoutput><cfabort>
Perhaps you can help me, many thanks in advance!
Marcel