[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

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?
0
IUFITS
Asked:
IUFITS
1 Solution
 
joeposter649Commented:
I prefer to use ado to do a binary write and send "attachment" in a content-disposition header...
http://support.microsoft.com/kb/q260519/
0
 
mrichmonCommented:
>>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
0
 
OkigireCommented:
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.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now