0

I'm trying to link to a file hosted locally on an internal webpage for employees only. Here is the link:

<a href="file:///*:/******/******/******.xls" target="">*****</a>

(I have starred the path out) and this works fine but opens the file in the browser. I want it to open in Excel.

Is this possible?

home
  • 12,468
  • 5
  • 46
  • 54
twigg
  • 3,753
  • 13
  • 54
  • 96
  • Did you try it with different browsers? I'm not sure, but as far as I can remember it should work. Btw, which browser? – home Oct 20 '11 at 12:24

2 Answers2

0

If you send it with the http header

Content-Disposition: attachment; filename=file.xls

It should pop open the "what do you want to do with this file" dialog

hair raisin
  • 2,618
  • 15
  • 13
0

Found this on here: http://www.codetoad.com/forum/14_18720.asp

"I think you'll find success by linking to a properly configured shortcut (.lnk) instead of the file itself. Configure a shortcut to the application that passes the data file as a parameter. Then try setting your HTML link to the shortcut file. If this works, it will only work on Windows of course, and the user will have to have the app installed -- and in the same directory structure as the link specifies."

Jon Schwartz
  • 168
  • 1
  • 11