You will need to set the correct "content type" and/or "content disposition" headers on the server.
You can't do this reliably for Internet Explorer in HTML alone, but you you can do it server side (e.g. with PHP, ASP, or whatever it supports) or by configuring the web server the file is hosted on (e.g. Apache or IIS) to return the appropriate headers for all files with the given extension.
See this answer for some insight:
Setting mime type for excel document
Note: Because Internet Explorer exposes settings that override this behaviour, and different versions of Internet Explorer and Microsoft Office respond differently to some headers by default, you might find it always behaves a bit unreliably, even when you set the headings on the server. I've encountered different browser behaviour on corporate PC's at the same organisation with the same operating system and the same version of Internet Explorer and Microsoft Office, but was unable to find the root cause of the different behaviour (e.g. downloading vs. opening actually inside the browser vs. opening in the application) Other other browsers at least seem to behave consistently.