Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Autotests: how to catch, verify and close Excel window

$
0
0
Dear Experts,

In my test codeunit I am running the report which produces and opens the excel worksheet.

I need to check the values in the produced excel and close the window.
Can anyone give me directions how to achieve this?
NAV2013R2

I guess it should be done using DotNet (in which I am not so experienced unfortunately).

What I've done:
I found the following piece of C# code:
instance = (Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");
And I want to call same from NAV.

Now when I try to define the DotNet variable, I go to Assembly List, on the .NET tab I scroll to System.Runtime.InteropServices and select it. Now I expect that there will be list of Types, including Marshall, but the list is empty. Here I stuck.

Can anyone push me to the correct direction?

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>