problem with xls files located on the server to download

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
orangeapple
Forum Commoner
Posts: 70
Joined: Tue Jan 06, 2004 1:24 pm
Location: Geneva / Switzerland

problem with xls files located on the server to download

Post by orangeapple »

Hi friends,

I have some excel files on the server that i would like to be opened by the website users.

So i have echo out an anchor tag with a link to my files, but when the user clicks on the link, the file opens as an excel sheet in Internet Explorer...

How can i make it open in Excel ?

thanks for your help !!!
User avatar
chrys
Forum Contributor
Posts: 118
Joined: Tue Oct 04, 2005 9:41 am
Location: West Roxbury, MA (Boston)

Post by chrys »

Tell your users not to use internet explorer :P Call bill...

No, there might be a way. Something to do with sending them to a page with content-type headers. Someone here should know.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

It has nothing to do with headers... The user has the IE Excel viewer extension, you cannot bypass that to jump into a different applicaiton.
User avatar
orangeapple
Forum Commoner
Posts: 70
Joined: Tue Jan 06, 2004 1:24 pm
Location: Geneva / Switzerland

Post by orangeapple »

It is very strange in fact, on some PC when i click on the link, the download prompt appears : i have the possibilty to either save the file or open it (in IE) and on some pc the xls file opens directly in IE without prompting for save or open.

Same kind of strange thing with a backup .txt file i have created (with content-type header) : on some pc it opens in the notepad and on others it opens in IE.

Is it a matter of Windows setting ???
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Windows setting.. yep.
Post Reply