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:
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?
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?