Using the following code I can run Excel from within C#:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "cmd.exe";
p.Start();
Can I make Excel start hidden or minimized using any command line parameters?
(Edit: Tried p.StartInfo.WindowStyle
and it had no effect.)
I need to start Excel without using COM because when starting Excel over COM, none of the XLA add-ins are loaded.
You can set the
WindowStyle
property toMinimized
orHidden
. Like the following: