Click here to Skip to main content
15,907,281 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
i have a excel file when user click on help button excel file should open on browser ...i don't know how to do this ...
Posted

Simply you can try with this line:
C#
Response.AppendHeader("Content-Disposition", "inline;filename=" + "yourExcelFileName.xls");

If not then you can follow the similar ones:
How To Write Binary Files to the Browser Using ASP.NET and Visual C# .NET[^]
open excel file in browser[^]
C# when opening a .xls file in the web browser it opens an instance of excel[^]
 
Share this answer
 
Embed Google Doc Viewer in your own webpage to display any kind of documents including Excel files. It's very simple to use and free! Add a markup code like the following in your webpage:

HTML
<iframe src="http://docs.google.com/gview?url=URL_TO_YOUR_EXCEL_FILE_HERE&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900