GillyTheTaffy
asked on
500pnts!! - GetObject In Javascript
I have the following script in an aspx in a client script section.
<html>
<script language="javascript">
var oXlApp;
function getExcelInstance()
{
try
{ // this never works even if excel is running
oXlApp=GetObject("","Excel .Applicati on.11")
alert("Get Object Works!!");
}
catch(ex)
{
alert("Get Object Failed:- "+ex.message);
try
{
oXlApp=new ActiveXObject("Excel.Appli cation.11" );
alert("ActiveXObject Works!!");
}
catch(ex)
{
alert("ActiveXObject Failed:- " + ex.message);
}
}
}
</script>
<body>
<input type="button" onclick="getExcelInstance( );" value="clickMe" ID="Text1" NAME="Text1"/>
</body>
</html>
The GetObject never works even if there is a running instance which there is after the 1st time hitting the button. I get Automation Server Can't Create Object. The activeXObject then fires and I get an instance of excel for each button click.
I've got a really urgent deadline and this is my last bug!! Surely an easy 500pnts for someone out there!
TIA
This is really urgent as I've got
<html>
<script language="javascript">
var oXlApp;
function getExcelInstance()
{
try
{ // this never works even if excel is running
oXlApp=GetObject("","Excel
alert("Get Object Works!!");
}
catch(ex)
{
alert("Get Object Failed:- "+ex.message);
try
{
oXlApp=new ActiveXObject("Excel.Appli
alert("ActiveXObject Works!!");
}
catch(ex)
{
alert("ActiveXObject Failed:- " + ex.message);
}
}
}
</script>
<body>
<input type="button" onclick="getExcelInstance(
</body>
</html>
The GetObject never works even if there is a running instance which there is after the 1st time hitting the button. I get Automation Server Can't Create Object. The activeXObject then fires and I get an instance of excel for each button click.
I've got a really urgent deadline and this is my last bug!! Surely an easy 500pnts for someone out there!
TIA
This is really urgent as I've got
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER