如何使用C#excel自动化隐藏excel应用程序? [英] How to hide excel application using C# excel automation?
本文介绍了如何使用C#excel自动化隐藏excel应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于Word 2007自动化,以下代码使winword应用程序不可见。
For Word 2007 automation the following code makes the winword app invisible.
WordApp.Visible = false;
但是当我使用相同的Excel 2007逻辑隐藏应用程序时,属性
But when i''m using the same logic for Excel 2007 to hide the app, the property
ExcelApp.Visible = false;
不会让它看不见。
请建议为什么这个属性没有设置为false /其他一些解决方法。
VS -2008
.NET - 3.5
Office - 2007是用于工作的技术版本。
OS - Windows 8.
问候
Sayan Bera
does not make it invisible.
Please suggest why this property is not being set to false/ some other way to work around.
VS -2008
.NET - 3.5
Office - 2007 are versions of tech used for working.
OS - Windows 8.
Regards
Sayan Bera
推荐答案
Excel应用程序的可见
属性是bool而不是字符串。
你应该使用
TheVisible
property of an Excel Application is a bool not a string.
You should use
ExcelApp.Visible=false;
这篇关于如何使用C#excel自动化隐藏excel应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文