|
|
| |
1. IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 argo naut | 2007-02-23 13:32:04 |
Opera and Mozilla generate and download just fine. IE (tried 6 and 7) throw message:
---
Internet Explorer cannot download index.php?pid=download from www.mysite.com
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
---
Do you have ideas what is the reason IE cant get the file from stream? |
| |
2. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 Diego Velázquez | 2007-04-04 01:49:24 - In reply to message 1 from argo naut |
I had the same problem.
Use this headers:
header ("Content-type: application/x-msexcel");
header ("Content-Disposition: attachment; filename=\"" . basename($export_file) . "\"" );
readfile($export_file);
exit; |
| |
3. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 Kufa | 2008-03-13 14:34:20 - In reply to message 2 from Diego Velázquez |
I am using those headers and still get the errors.
Any ideas. |
| |
4. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 Daniel Acosta | 2008-06-21 16:46:38 - In reply to message 3 from Kufa |
| just reload your apache server... |
| |
5. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 Michal | 2008-07-22 16:41:56 - In reply to message 1 from argo naut |
Use this code:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".basename($export_file).";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($export_file));
readfile($export_file);
exit; |
| |
6. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 doug | 2009-06-29 17:10:50 - In reply to message 1 from argo naut |
| I had the same issue. Solved it...the details are in this blog post: http://www.dougboude.com/blog/1/2009/06/Disappearing-IE-Popup-Window-During-SaveOpen-Dialog.cfm |
| |
7. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 John Huseinovic | 2009-08-18 07:03:24 - In reply to message 3 from Kufa |
easy answer...
all the code headers and everything else the other guys said is 100% correct... only problem in IE is; it won't allow BUTTONS to activate the download... so you need to convert it to a <a href=...> link. |
| |
8. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 John Ralph | 2009-11-04 03:25:31 - In reply to message 5 from Michal |
| I'm using the headers as suggested. IE pops up the warning banner about downloading a file, but the file never downloads. |
| |
9. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 John Ralph | 2009-11-04 03:28:08 - In reply to message 8 from John Ralph |
| I inserted the header statements suggested by argo naut. IE no longer throws errors, but I never get the file downloaded...even though the IE warning banner tells me the site is trying to download a file. Probably some obscure setting in IE, but can't find it. |
| |
10. Re: IE 6 and 7 unable to download generated xls |
|
Reply |
|
|
 André Weiss | 2011-04-07 18:24:37 - In reply to message 9 from John Ralph |
$file = "name_of_file.xls";
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".basename($file).";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($file));
Work´s fine! =)) |
|