Open html xls link in EXCEL app (not in IE browser)

Is it possible (using html / javascript) to ensure that the .xls file behind the html link opens in EXCEL and not in a reduced functionality browser alternative?

<a target='_blank' href='http://etc/etc/Myfile.xls'>  Mylink </a>

      

+2


source to share


1 answer


It is more a function of the server, which supplies the file with a mime-type header that tells Excel to open it.

Content-Type: application/excel
Content-Type: application/vnd.ms-excel

      

although, I must admit, I'm not sure what the difference is between the two.



I know that I have managed to serve HTML tables as text files with type names something.xls

and Excel opens them. This is not what you are doing, but Excel does not understand the difference until it opens the file.

I am also not familiar with what you have called a browser alternative (with reduced functionality). The browsers I use at work (IE7 and FF3.5) open directly with Excel.

I am not using the target = '_ blank' attribute. What happens if you drop it?

+3


source







All Articles