954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Read excel file in asp.net

<html>

<head>

<title></title>

</head>

<body>
<script type="text/javascript">
function read()
{

var myApp = new ActiveXObject("Excel.Application");
if (myApp != null)
{
myApp.visible = true;
myApp.workbooks.open("C:\\Book2.xls");
}
}

</script>
<button onclick="read();">READ</button>
</body>

</html>

Poojasrivastava
Newbie Poster
13 posts since Apr 2009
Reputation Points: 11
Solved Threads: 0
 

<html> <head> <title></title> </head> <body> <script type="text/javascript"> function read() { var myApp = new ActiveXObject("Excel.Application"); if (myApp != null) { myApp.visible = true; myApp.workbooks.open("C:\\Book2.xls"); } } </script> <button onclick="read();">READ</button> </body> </html>


In the internet explorer choose Tools tab and click internet options.
In the internet options, click security tab and choose custom level.
In the custom level, choose enable radio button ofInitilize and script ActiveX controls not marked as safe under ActiveX controls and plug-ins this heading.

Thanks

prasanna201
Newbie Poster
2 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You