[英]Microsoft Excel is waiting for another application to complete an OLE action Error
I frequently receive ok-only prompts while automating add-ins in Excel, stating that Microsoft Excel is waiting for another application to complete an OLE action Error.我在 Excel 中自动化加载项时经常收到 ok-only 提示,指出 Microsoft Excel is waiting for another application to complete a OLE action Error。 How to use Interop.dll to show a custom message and handle this error programmatically.
如何使用 Interop.dll 显示自定义消息并以编程方式处理此错误。 Before receiving the prompt enter link description here
在收到提示之前,请在此处输入链接描述
While You possibly can catch these exceptions depending on your automation framework and do something with it - these type of errors typically comes from not closing the files properly when changing from one to another.虽然您可能可以根据您的自动化框架捕获这些异常并对其进行处理 - 这些类型的错误通常来自从一个文件更改为另一个文件时未正确关闭文件。
Make sure you dispose all that can be disposed and close all which can be closed in reverse order obviously and it should go away.确保你处理了所有可以处理的东西并关闭了所有可以以相反顺序关闭的东西,它应该消失。
If You need more details do post your code for opening and closing looks like a bug there which will make it not coming up.如果您需要更多详细信息,请发布您的打开和关闭代码,看起来像是一个错误,这将使它不会出现。
You do not technically have to use interop, could you consider using a more modern package for interacting with excel?从技术上讲,您不必使用互操作,您可以考虑使用更现代的包来与 excel 交互吗?
If you are using google drive / file stream then this may be the problem.如果您使用的是 google drive / file stream 那么这可能就是问题所在。 Turn off "Real Time Presence in Microsoft Office" then the messages go away.
关闭“Microsoft Office 中的实时状态”,然后消息 go 消失。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.