500pnts!! - GetObject In Javascript

Posted on 2006-04-03
Last Modified: 2008-01-09
I have the following script in an aspx in a client script section.

<script language="javascript">
var oXlApp;

function getExcelInstance()
  { // this never works even if excel is running
    alert("Get Object Works!!");
    alert("Get Object Failed:- "+ex.message);
      oXlApp=new ActiveXObject("Excel.Application.11");
      alert("ActiveXObject Works!!");
      alert("ActiveXObject Failed:- " + ex.message);
  <input type="button" onclick="getExcelInstance();" value="clickMe" ID="Text1" NAME="Text1"/>

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!


This is really urgent as I've got
Question by:GillyTheTaffy
    LVL 3

    Accepted Solution


    "Cannot Call GetObject from Script in IE to Access Running Object
    Calling GetObject to get a running ActiveX object on a client system would be a large security risk because any running object on the system could be accessed without direct user permission, and is therefore not allowed by Internet Explorer. There is no way to change this behavior, either through code or manually by an end user.
    LVL 1

    Author Comment

    that is the worst correct answer I have ever had - but thanks for confirming that for me

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Both jQuery and Mootools offer some nice, easy to use scripts. Mootools is best known for their interactive slideshows and jQuery for their menus, but both have many other uses as well.   jQuery is basically a toolkit with many DOM (http://en.wik…
    Article by: DanRollins
    This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now