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
Post a Comment