<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>
<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 of Initilize and script ActiveX controls not marked as safe under ActiveX controls and plug-ins this heading.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.