Re: Data download from PHP/MSSQL to Excel
From: Hi Ho (ziad44444_at_hotmail.com)
Date: 04/22/04
- Next message: Chung Leong: "Re: Newbie -- application development"
- Previous message: Chris Allen: "Re: Session_Start() Doesn't Work"
- In reply to: marty: "Data download from PHP/MSSQL to Excel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 21 Apr 2004 18:23:01 -0400
This is browser dependant and not PHP
"marty" <marty_elder@adp.com> wrote in message
news:166bf1ae.0404210549.313ad03b@posting.google.com...
> I have a webpage that displays data from a SQL database in table
> format. I found information on how to create a way to allow a user to
> download this information to Excel using 'Header()' in the PHP code.
>
> Header("Content-Type: application/vnd.ms-excel");
> Header("Content-Disposition: attachment;
> filename=\"filename.xls\"");
>
> I setup a link on the display page that sends the variables needed for
> the SQL query to a different PHP page and the link is targeted to a
> bogus target window (target="excel") so that it doesn't change my
> current display. This is meant for people who find the proper display
> they want and then want to save it but also want to continue display
> other data in the current window.
>
> If the user clicks the link it then opens a browser window and prompts
> the user with the typical IE download prompts, which is fine. But if
> the user chooses to 'Save' the file to his/her pc and then goes
> through the steps to save it, the browser window that was opened
> doesn't automatically close. If the user chooses to open the .xls or
> chooses to cancel the download, then the browser window closes just
> fine.
>
> Any suggestions as to how to alleviate this problem?
- Next message: Chung Leong: "Re: Newbie -- application development"
- Previous message: Chris Allen: "Re: Session_Start() Doesn't Work"
- In reply to: marty: "Data download from PHP/MSSQL to Excel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|