Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Connecting to an already running instance of MS Excel

Connecting to an already running instance of MS Excel

Connecting to an already running instance of MS Excel

I know this is a long-standing issue, but I have already tried all the fixes I have run across.

1. I need to transfer some data from a IE Addon that I wrote to an Excel Spreadsheet of my own design. I can create an new instance and control ; My problem is trying to connect to an already running instance through COM. I am working on RadStudio XE2 on a Win7 64bit machine.

2. I have already tried using GetActiveObject('Excel.Application'); . This results in an eOLESysError Exception, 'Operation unavailable". I have tried to send a WM_ACTIVATEAPP message to the already running instance's main window in an effort to get the existing instance to register on the RunningObjectTable; same result. I have tried using a TExcelApplication with it's ConnectKind property set to ckRunningInstance; again 'Operation Unavailable.'

3. I want to try a manual registration of the instance on the ROT, either from my addon or from within the Excel app itself but need some examples to work from. If there is anybody out there that would be willing to advise or has a working example of how to make this connection work, I would be much obliged. My Google searches are running dry.

RE: Connecting to an already running instance of MS Excel

Upon further research, it looks to me like this objective is going to be unobtainable, as the low privilege level that IE addons run in apparently will not even allow me to open up Excel in a seperate process without a broker application anyway. So thanks for all the fish, but going to move forward with what I have as is. I have already wasted enough time on this as it is.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close