【发布时间】:2010-09-15 16:07:57
【问题描述】:
使用以下代码,我可以在 C# 中运行 Excel:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "cmd.exe";
p.Start();
我可以使用任何命令行参数使 Excel 开始隐藏或最小化吗?
(编辑:尝试p.StartInfo.WindowStyle,但没有效果。)
我需要在不使用 COM 的情况下启动 Excel,因为通过 COM 启动 Excel 时,none of the XLA add-ins are loaded。
【问题讨论】:
标签: c# shell process excel-2007 command-line-arguments