0 Replies Latest reply on May 30, 2008 7:51 AM by rgiresi1

    Exporting to MS Excel - default "save as" type

    rgiresi1
      We have written code in our application that exports the results of the in MS Excel format and everything works fine except for one minor thing using IE. When the user is prompted, they can either "open" or "save". If they choose "save", it saves it fine as a MS Excel file type. However, if they choose "open" (which does open perfectly fine in Excel), but then they later choose the "Save As" option from MS Excel's menu, the default "Save As" type now becomes "Web Page (*.htm; *.html). It actually saves fine as an Excel document, but our customers are concerned about it because this is going to be a public application and they are worried that it might confuse the end-users. So what I'm really asking is if there's a way to programmatically control the default "Save As" type from within MS Excel? I've attached a small snippet of our code which details how we are performing the export.

      <!--- use cfsetting to block output of HTML outside of cfoutput tags --->
      <cfsetting enablecfoutputonly="Yes">

      <!--- Send output to a Microsoft Excel Spreadsheet --->
      <cfheader name="Content-Disposition" value="attachment; filename=AcctOpsRptSpendAgCat.xls">
      <cfheader name="Expires" value="#Now()#">
      <cfcontent type="application/vnd.ms-excel">