cancel
Showing results for 
Search instead for 
Did you mean: 

New object is opening instead of identifying the existing one in the object browser

Occasional Contributor

New object is opening instead of identifying the existing one in the object browser

Hi Guys , 

 

I am using windows 10 and TC 12.5 version . 

 

In my system I have opened a blank excel sheet and via Test complete I initialize excel via the below code :

 

if(MsExcel != null) return;
MsExcel = Sys["OleObject"]("Excel.Application");
return MsExcel;

 

 

I see in object browser that a new excel is being opened instead of identifying the existing opened Excel . 

 

In windows 7 and TC version 12.20 I don't see this issue . 

 

Can someone help me out here

3 REPLIES 3
Community Hero

Re: New object is opening instead of identifying the existing one in the object browser

I wonder to know, What purpose you are using the OleObject?

 

If you are using to read the data then you can use DDT driver 

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Occasional Contributor

Re: New object is opening instead of identifying the existing one in the object browser

I am actually writing data on the excel. 

Community Hero

Re: New object is opening instead of identifying the existing one in the object browser

Hi,

 

https://smartbear-cc.force.com/portal/KbArticleViewer?name=Get-COM-reference-for-a-running-Excel-ins... should provide you with the solution.

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================