Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to an already running instance of MS Excel

Status
Not open for further replies.

Prattaratt

Technical User
Aug 6, 2000
291
US
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.
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top