1

I am currently using Visual Studio 2010 and wanted to have a link on my page that opened in a new window a simple excel sheet that is on a local drive.

I have used a simple tag to open this file.

  <a href="S:/BettyTest.xlsx" target="_blank" title="Excel Test">Excel Book Test</a>

This opens the file as requested but it doesn't open this to a new window. I am currently using IE8. When clicking the link, I get the prompt to either open or save the workbook and when I select open, this opens over the web page.

Cheran Shunmugavel
  • 8,319
  • 1
  • 33
  • 40
Betty
  • 621
  • 1
  • 12
  • 24
  • I think this will be dependant on client preferences - which of course you cannot change .... – Manse May 15 '12 at 11:05

2 Answers2

4

Your href needs to be different

Something like this

file:///S:/BettyTest.xlsx

bart s
  • 5,068
  • 1
  • 34
  • 55
2

you can use Google Document Viewer to view all files

Here is the Url to view

http://docs.google.com/gview?url=YOUR_FILE_URL

I am not sure about how its working but it will open your file instead of download

Thanks

Suresh kumar
  • 2,002
  • 1
  • 19
  • 28