如何使用C#编程地使用VSTO组件关闭Excel Workbook
在Excel中更新后,需要立即关闭工作簿。 如果我编写环境.exit(),则它立即关闭,但在再次打开同一Excel应用程序后不久。我尝试了Globals.thisworkbook.close(0);这关闭了相关的应用程序,表格,但我必须手动关闭Excel。更新后,请帮助我关闭工作簿。
我的应用程序是一个基于Windows的应用程序,带有VSTO组件(Excel)
After updating in excel, there is a requirement of closing the Workbook immediately.
If I write Environment.Exit(), then it closes immediately but soon after opening again the same excel application. I tried with Globals.ThisWorkBook.Close(0); this closes the application related, sheet but I manually have to close Excel. Please help me close the Workbook after update happens.
My Application is a windows based app with VSTO assemblies(excel)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 application.quit.quit Microsoft Excel。这是MSDN所说的:
Use the Application.Quit method which quits Microsoft Excel. Here is what MSDN states: