cffunction build to download the .xsl file. when user tries to open .xsl file in msoffice2007 environment the function gives an error and do not allow to open.
Please help


7 Years
Discussion Span
Last Post by neemisha


I think my question was not clear, let me give describe it more.

I am using coldfusion 7 version and in my machine I have msoffice2007
with the earliar version of msoffice i.e. '2003' the code was working fine without any error.
I have used this code to let the user open or download excel sheet.

<cffunction access="public" name="ExcelDownload" output="true" returntype="void">
<cfargument name="header" type="string" required="no">
<cfargument name="Filename" type="string" required="yes">
<cfset var CRLF=chr(13)&chr(10)>
<cfcontent type="application/vnd.msexcel">
<cfheader name="Content-Disposition" value="attachment; filename=#Filename#">
<cfif isDefined('header')>

when I try to download an excel file from the above cfm module it opens an excel sheet with an error message popped up which says:
"C:\<path>\Filename[1].xls" could not be found. Check the spelling of the file name, and verify that the file location is correct. If you are trying to open the file from your most recently used files, make sure that the file has not been renamed, moved or deleted.

hope this will help in understanding the problem.


Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.