Re: Excel export problem in IE



header("Cache-Control: no-stor,no-cache,must-revalidate");
header("Cache-Control: post-check=0,pre-check=0", false);
header("Cache-control: private");
header("Content-Type: application/force-download");
header("Content-Disposition: inline; attachment;
filename=cimarron.xls");
header("Content-Transfer-Encoding: binary");
header("Pragma: no-cache");
header("Expires: 0");

Thats what I finally used and inline at line 5 was the only thing that
finally made it work Thanks guys
SM

mukherjeesubrato@xxxxxxxxx wrote:
Dropping the browser is not the option. I have tried with the
header("HTTP/1.1 100 OK "); and header("Status: 200 OK"); but still
the same result.

J.O. Aho wrote:
mukherjeesubrato@xxxxxxxxx wrote:
Hi,
I have this script to export mysql data to excel. I have tried
everything but I am not able to get this script to work for IE. The
script downloads the data using Mozilla or Netscape but it fails and
says

Internet Explorer cannot download export.php from "IP Address" (this is

the IP on which the file resides). Internet Explorer was not able to
open this Internet site. The requested site is either unavailable or
cannot be found. Please try again later.


If I remove the header("Content-type: application/vnd.ms-excel;
name='excel'"); then it outputs the database values on the page even
using IE . Not sure what is wrong with the script.

MSIE has great deal of problems with mime types (I guess it's for bill didn't
understand how it worked), you may need to add the following two headers
before the content-type

header("HTTP/1.1 200 OK");
header("Status: 200 OK");

I do strongly suggest you drop the broken browser and use only your Mozilla
or/and NetScape.


//Aho

.



Relevant Pages

  • Script error? Again
    ... netscape because they will not load in internet expolorer. ... Cannot Print in Internet Explorer if Surfairy Is Installed ... Internet Explorer Script Error An error has occurred in the ...
    (microsoft.public.windowsxp.general)
  • Re: Proxying a FLV file
    ... of each and see if your script has introduced any differences between them. ... IE throws an error box window saying "Internet Explorer cannot ... able to open this Internet site - the site is either unavailable or ... but I don't fancy sticking 1.7gb of flv's into a DB! ...
    (comp.lang.php)
  • Re: Excel export problem
    ... excel, or excel has to be already open for it to open from the link. ... I have this script to export mysql data to excel. ... Internet Explorer cannot download export.php from "IP Address" (this is ... open this Internet site. ...
    (php.general)
  • Re: Excel export problem
    ... excel, or excel has to be already open for it to open from the link. ... I have this script to export mysql data to excel. ... Internet Explorer cannot download export.php from "IP Address" (this is ... open this Internet site. ...
    (php.general)
  • Re: Excel export problem
    ... excel, or excel has to be already open for it to open from the link. ... I have this script to export mysql data to excel. ... Internet Explorer cannot download export.php from "IP Address" (this is ... open this Internet site. ...
    (php.general)