Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C# 中有没有办法在加载 excel 文件之前关闭 excel 中的宏。我正在使用 Excel 互操作加载 excel 文件。我所看到的只是 VB.NET 的解决方案。
谢谢尼山特
我想你可以在你的 Excel 应用程序上设置它:
Excel.Application xapp = new Excel.Application(); xapp.AutomationSecurity = Microsoft.Office.Core.MsoAutomationSecurity.msoAutomationSecurityForceDisable;