Skip to main content
Known Participant
October 22, 2012
Question

xls export is not working on https

  • October 22, 2012
  • 1 reply
  • 3112 views

I am useing

      <cfheader name="Content-Disposition" value="attachment; filename=myfilename.xls">

<cfcontent type="application/vnd.msexcel" reset="no"  > 

to get a file in .XLS fromat.

This is working fine in DEV environment.

But on PROD which is secure one, uses SSL, and not working. A pop-up window comes and immediately closes and wont generate .xls file.

Please help

This topic has been closed for replies.

1 reply

Miguel-F
Inspiring
October 22, 2012

How are you generating the xls file/content?

Known Participant
October 22, 2012

I generate a html output

example:

<cfheader name="Content-Disposition" value="attachment; filename=bf_current_year_projects_not_funded.xls">

<cfcontent type="appliction/application/vnd.msexcel" reset="no"  > 

<cfoutput>

<table border="1" >

<tr>

                    <th colspan="8" align="center">B&F Current Year Projects Not Funded</th>

                </tr>

                <tr>

                    <th colspan="8" align="center"><cfoutput>#dateformat(now(),'mm/dd/yyyy')# #timeformat(now(),'hh:mm:tt')#</cfoutput> </th>

                </tr>

          <tr>

           <th>Fiscal Year  </th>

                      <th >City           </th>

        <th >Program Office                     </th>

        <th >Project Engineer  </th>

        <th >Project Title</th>

        <th >Status           </th>

        <th>Substantial Completion Date </th>

     

      <th nowrap="nowrap">Budget Amount </th>

      

     

       

     </tr>

 

<cfloop query="cynf">

           

     <tr>

                                    <td>#REQUESTED_YEAR#                                        </td>   

                    <td>#CITY#                                        </td> 

                    <td>#PROGRAM_OFFICE_ABBREV#                               </td>

                    <td>#engg#                     </td>

                    <td>  #PROJECT_TITLE#                                        </td>

                    <td>#Status#</td>

                    <td>#dateformat(SUBSTANTIAL_COMPLETION_DATE,'mm/dd/yyyy')#</td>

                  

                    <td>$  #total_cost#                                        </td>

                 

     

     </tr>

          

</cfloop>

</table>

</cfoutput>

Miguel-F
Inspiring
October 22, 2012

As you stated, that is HTML output not XLS.  I'm not sure what you are trying to do.  Can you elaborate a bit?  Are you trying to show the user some output and allow them to save it as XLS or are you just trying to send them an XLS file?

Have you looked at the cfspreadsheet tag?  http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec17cba-7f87.html