Ask a Question

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

ashishnagpal26
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
shankar_r
Community Hero

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

I am actually writing data on the excel. 

AlexKaras
Community Hero

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 Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: