Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: Application.GetActiveInstances() returns wrong excel instances

$
0
0
Hello,

I am currently discovering the netoffice project and I am quite impressed by what you did at the moment.

I have just a little issue about the Application.GetActiveInstances().

Here is the snippet I use (At this time I have one instance that actually is visible on my desktop and on "fake" instance I use for tests):
         Application xl = new Application();
        List<Application> apps = Application.GetActiveInstances().ToList();

        apps.RemoveAll(app => app.Visible == false);

        return apps;
Actually apps contains 2 instances after Application.GetActiveInstances() but my filter on the visible property is not working whereas I have only one visble on my desktop.

Even stranger, the instance created in the code has the same caption as the other instance which is quite disturbing.

Is that a real issue or am I doing something wrong ?

Thanks

Viewing all articles
Browse latest Browse all 1741

Trending Articles



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