Is an opened Excel-Reference by TestComplete somehow hidden for other applications?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Hope, https://smartbear-cc.force.com/portal/KbArticleViewer?name=Get-COM-reference-for-a-running-Excel-ins... will help.
/Alex [Community Champion]
____
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
