List:General Discussion« Previous MessageNext Message »
From:Jay Blanchard Date:May 1 2002 3:34pm
Subject:RE: MySQL to Excel ?
View as plain text  
[snip]
Try adding below the header in a php file & output the
query data in HTML table format.

<?
header("Content-Type:  application/x-excel");
header("Content-Disposition: inline;
filename=\"excel.xls\"");

header("Expires: 0");

header("Cache-Control: must-revalidate, post-check=0,
pre-check=0");
?>
[/snip]

I am trying this method, and if I use the file with a .xls extension it just
shows me the code. If I use the .php extension it opens Excel, and then puts
up a file download box. Then I have to tell it what kind of program created
the file. Once all of this is done it will display the data properly (as I
had wanted to from the original e-mail). However, the users of these reports
will not want to go through two dialog boxes before they get to the report.
What am I doing wrong?

Thanks!

Jay Blanchard


Thread
Communication failure during handshake - please helpJayant Kumar1 May
  • MySQL to Excel ?Jay Blanchard1 May
    • Re: MySQL to Excel ?James Dellacova1 May
      • RE: MySQL to Excel ?Jay Blanchard1 May
      • RE: MySQL to Excel ?Jay Blanchard1 May
    • Re: MySQL to Excel ?Jim Philips1 May
    • RE: MySQL to Excel ?Gurhan Ozen1 May
    • Re: MySQL to Excel ?Eugene Mah1 May
    • Re: MySQL to Excel ?Alexander Keremidarski2 May
      • RE: MySQL to Excel ?Jay Blanchard2 May