In c# How do I control which Excel opens? -


i have excel 2010 , excel 2013 (via office 365) on machine (windows 7 home premium)

is there way control excel opens when

 var excelapp = new excel.application(); 

is called?

thanks time, kw

one of possible approaches rely on dynamic com automation:

type exceltype = type.gettypefromprogid( "excel.application.[v]" ); dynamic excel = activator.createinstance( exceltype ); 

where

excel.application.[v] is

excel.application.14 or excel.application.15 depending on version want run.

since excel dynamic, use in same way, despite actual version:

excel.visible = true; ...  

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -