cancel
Showing results for 
Search instead for 
Did you mean: 

Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

SOLVED
Highlighted
Contributor

Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

We have the following situation:

we start TestExecute 14 and get per OLEObject a reference to Excel.Application. We open a Workbook. An Excel-instance is opened with this Workbook. Another (Delphi) application opens and writes another Workbook. Both Workbooks appear in the same instance under Windows 7/Office 2010, so TestExecute can search the new Workbook in the only existing instance and work with it. So far so good.

 

Now we are using Windows 10/Office 2016: the Delphi-application opens another Excel instance instead of using the same instance of TestExecute!?! Is the TestExecute-Excel-Instance somehow hidden for other applications? We already set the registry entry 'disablemergeinstance' to 0, but this does not make any difference.

 

How can we search a Workbook in several instances? Or better, how can we make the TestExecute-Excel-Instance 'public'?

 

sincerely

P. Vinders

SOPTIM AG, Germany

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Hero

Re: Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

Hi,

 

Hope, https://smartbear-cc.force.com/portal/KbArticleViewer?name=Get-COM-reference-for-a-running-Excel-ins... will help.

 

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/
================================
Contributor

Re: Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

Hi,

the following works for me with EXCEL7 in MSAA (Windows 7/10 and Office 2016):

Sys.Process("EXCEL").Window("XLMAIN", "*", 1).Window("XLDESK", "*", 1).Panel("*").NativeObject.Application

 

With this property I have all original Properties/Methods like before.

 

Thanks!

 

sincerely

P. Vinders

5 REPLIES 5
Community Hero

Re: Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

Hi,

 

Hope, https://smartbear-cc.force.com/portal/KbArticleViewer?name=Get-COM-reference-for-a-running-Excel-ins... will help.

 

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/
================================
Contributor

Re: Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

Hi Alex,

 

thanks for the reply. Testcomplete is the first application which starts opening Excel-Workbooks. The other Delphi-application creates/fills Workbooks during testexcution. So no Excel-instance runs at Start...

Community Hero

Re: Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

Using OleObject('Excel.Application') creates a running Excel instance.  So, as soon as you call that in TestComplete, a running instance is created.  Hence, the article @AlexKaras posted still applies


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Contributor

Re: Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

Hi,

 

After adding EXCEL7 in MSAA, the Property is visible not visible under

Sys.Process("EXCEL").Window("XLMAIN", "a - Excel", 2).Window("XLDESK", "", 1).Window("EXCEL6", "", 1). It is visble under Sys.Process("EXCEL").Window("XLMAIN", "a - Excel", 2).Window("XLDESK", "", 1).Panel("a"). Sys.Process("EXCEL").Window("XLMAIN", "a - Excel", 2).Window("XLDESK", "", 1).Window("EXCEL7", "", 1) has disappeared.

Instead of adding EXCEL7, I've added only EXCEL6 in MSAA: then the property is visible under Sys.Process("EXCEL").Window("XLMAIN", "a - Excel", 2).Window("XLDESK", "", 1).Window("EXCEL7", "a", 1) -- EXCEL 7 !!!!!!!!

 

Also, a Sys.Process("EXCEL").Window("XLMAIN", "", 3 exists though 2 files are opened, not 3...

I don't understand it.

Contributor

Re: Is an opened Excel-Reference by TestComplete somehow hidden for other applications?

Hi,

the following works for me with EXCEL7 in MSAA (Windows 7/10 and Office 2016):

Sys.Process("EXCEL").Window("XLMAIN", "*", 1).Window("XLDESK", "*", 1).Panel("*").NativeObject.Application

 

With this property I have all original Properties/Methods like before.

 

Thanks!

 

sincerely

P. Vinders

New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2
Top Kudoed Authors