Hi Guys,
I am trying to read content of an excel file using VBS
Here's my code
==============
<html>
<head>
<title>
</title>
<body>
<script language="VBScript">
Set objXL = CreateObject("Excel.Application")
Set objWB = objXL.WorkBooks.Open("C:\test1.xls")
Set objWS = objXL.ActiveWorkBook.WorkSheets("test1")
msgbox objXL.Cells(1, 1).Value
objWB.Close
objXL.Quit
</script>
</body>
</html>
It doesn't work ... All I get is an alert box
"
An ActiveX control on this page might be unsafe to interact with other parts of
the page. Do you want to allow this interaction?"
I hit yes ... and always get a blank page
Where did I make mistake?. I use IE 7.0
Thx!!
I am trying to read content of an excel file using VBS
Here's my code
==============
<html>
<head>
<title>
</title>
<body>
<script language="VBScript">
Set objXL = CreateObject("Excel.Application")
Set objWB = objXL.WorkBooks.Open("C:\test1.xls")
Set objWS = objXL.ActiveWorkBook.WorkSheets("test1")
msgbox objXL.Cells(1, 1).Value
objWB.Close
objXL.Quit
</script>
</body>
</html>
It doesn't work ... All I get is an alert box
"
An ActiveX control on this page might be unsafe to interact with other parts of
the page. Do you want to allow this interaction?"
I hit yes ... and always get a blank page
Where did I make mistake?. I use IE 7.0
Thx!!