> Well, whenever I click on the link to export to excel (in > IE), a "File Download" box pops up. It says the 'File name: > toexcel.php' and the 'File type: ' (blank). It asks if I > want to open or save. However, the File name should not be > toexcel.php (that's the page), it should be 'project.xls'. > > The error message I get whenever I try to Open or Save the > file is: "IE cannot dowload toexcel.php from your.server.com. > IE was not able to open this Internet site. The requested site > is either unavailable or cannot be found. Please try again > later." This is obviously not true b/c I can download from > elsewhere. > > Here's what I have included in the top of my file (just to reiterate): > > header('Content-Type: application/vnd.ms-excel'); > header('Content-Disposition: attachment; filename="project.xls"'); > > I tried adding the `vnd.` to the content-type, thinking that IE might > like that better, but it didn't. It works just the same though. Just curious, are right-clicking and doing "Save Target As..." or just clicking on the link. If you're right-clicking and doing that, then it's probably going to get the toexcel.php filename. If your PHP script in toexecl.php is the same as the example you posted earlier, all you should have to do is click on the link. Then it's all about whether IE is configured to download or display within IE, the XLS filetype. On that other thread I mentioned, they talked about changing the mime type to "octet/stream" I believe it was.. Then the .XLS for the filename triggers the Excel viewing.... Or something. It's something to play with at least. I don't have time to play and test, but thought I'd share the info. -TG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php