Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Excel file from a link

Status
Not open for further replies.

k8277

Programmer
Jan 10, 2003
104
US
This has to be something simple that I am overlooking, but I have the following code that is driving me crazy.

<a href="excel.xls" target=_blank>Excel file</a>

I am just trying to open an excel file in a new window, the new window opens however IE attempts to translate the file into html, because all I get is garbage?

What am I missing? Can I not get Excel to open in IE like other applications like Acrobat Reader and Word? I could also live with the link launching Excel and opening that instead of within IE.
 

A few questions:

- Do you actually have Excel installed?

- Is this web page (and thus the Excel file) being served by a web server, or running locally?

- if from a web server, have you modified the MIME type for .xls files?

Hope this helps,
Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Yes I have Excel installed and I have tried this on multiple machines.

Yes it is being served from IIS and I don't believe the MIME type has ever been modified.
 

Does double-clicking an xls file on the test machine load it OK in Excel?

Dan



[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
This is caused by the MIME type settings on the local machine, although you are sending the standard XL Content Type it is up to the local browser as to what it does with it. See the "How do I force Excel to open inside Internet Explorer instead of a separate window? " section at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top