Re: Excel not opened in browser when changing header

From: Date: Mon, 19 Feb 2001 22:07:55 +0000
Subject: Re: Excel not opened in browser when changing header
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40651@lists.php.net to get a copy of this message
> I tried using the code below to send the output to an Excel sheet in my > browser by changing the header to "Content-type: application/vnd.ms-excel". > However I only see normal text in a browser. Excel is not launched. What is > wrong?? > > -------------------------------------------------------------- > <?php > Header ("Content-type: application/ms-excel"); > Header ("Content-type: application/vnd.ms-excel"); Two different Content-type: headers? That seems pretty broken to me... But I could be just too narrow-minded. Try uploading an .xls file, and surfing to it to be sure you get the results you want. Then use: telnet yourhost.com 80 GET /whatever.xls HTTP/1.0 (hit return twice) from a Un*x box to see what headers are being sent that make it work. (Or find a way to make Windows give you an actual command-line telnet session without launching a GUI... Grrrr.) Send all those headers. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#40651) next »