Link to home
Start Free TrialLog in
Avatar of IUFITS
IUFITS

asked on

Stop Excel from opening in a browser window (IE)

Here's the deal.  I have say, 500 given Excel documents stored in the file system of an IIS web server.  I have a page that reads in those file names from the directory and displays an HTML link to them.  

Question:  How do I make that file open in Excel, and not in the browser when they click the link (I've seen this done before so I know it's possible)?  Is there an IIS setting I can choose that would change the MIME type for certain files as they're sent?  I can't change the content-type because I'm not actually creating the content, it's already a file.  I could read it in with the FileScriptingObject but that's not a preferred method.  Thoughts?
ASKER CERTIFIED SOLUTION
Avatar of joeposter649
joeposter649

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrichmon
mrichmon

>>I've seen this done before so I know it's possible
Actually it depends on the browser.  You can't control how it opens.  You can force them to save the file instead of opening, but then they have to double click to open (joeposter's link shows how to do that).

But you cannot control the user's browser as to if it opens in excel or the browser excel plug-in
I just want to reaffirm mrichmon's comment... I have my browser to open Excel (and Word, Acrobat, etc) every time.  I don't like my browser overshadowing the application.