CF9 CFSPREADSHEET OPEN EXCEL FILE AFTER ITS CREATED

I would like to know how you can force the excel file that is created to open after it has been created by cfspreadsheet.
theideabulbAsked:
Who is Participating?
 
_agx_Connect With a Mentor Commented:
You can display the spreadsheet in a browser, and use cfheader to direct the browser to open the file within the browser window.  Note, This is entirely dependent on user browser settings. The user must have the broser configured to open Excel files.  You can't control this from the server.

There is an example here:
http://www.coldfusionjedi.com/index.cfm/2009/12/9/Best-of-CF9-School-Directory

Example:
  <cfspreadsheet action="write"
                name="SFDir"
                filename="C:\temp\SF_School_Directory.xls"
                overwrite="true">

            <!--- Open Spreadsheet File --->
            <cfheader    name="Content-Disposition"
                        value="inline; filename=SF_School_Directory.xls">
            <cfcontent    type="application/csv"
                        file="C:\temp\SF_School_Directory.xls"
                        deletefile="yes">
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.