[thelist] excel/header question

Brian Cummiskey Brian at hondaswap.com
Fri Sep 30 10:26:13 CDT 2005


Brian Cummiskey wrote:

> as you can see from the FWD'ed message below,

well, that didin't work...  lol

here's the text:

 > I set up a page to export a result set to a nomal html table.
 > The client has asked that I put a simple button to send it to excel so
 > they can save the results easily.  No Problem.
 >
 > I set it all up, and added the proper headers:
 >
 > //------------------------
 > header("Content-Type: application/vnd.ms-excel; name='excel'");
 > header("Content-disposition:  attachment; filename='report_"
 > .date("Y-m-d").".xls'");
 > header("Content-Transfer-Encoding: BINARY");
 > //-----------------------
 >
 > and it comes up fine, however, it ALWAYS asks me to save/open twice
 > before it opens up in excel.  I've never seen this before.  Anyone have
 > an idea?  My client would be rather confused if they get the prompt
 > twice and probably not know what to do...
 >
 >
 > cliffs:
 > -click save to excel
 > -prompt, click open
 > -prompt again, click open
 > -excel opens the sheet
 > -why?



More information about the thelist mailing list