简体   繁体   English

Microsoft Excel 正在等待另一个应用程序完成 OLE 操作错误

[英]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.

相关问题 Microsoft Office Excel 正在等待另一个进程完成 OLE 操作 - Microsoft office Excel is waiting for another process to complete an OLE action 将Excel工作表导入SQL Server获取错误“OLE DB提供程序”Microsoft.ACE.OLEDB.12.0“用于链接服务器”(null)“” - Import Excel Sheet into SQL Server Getting Error “The OLE DB provider “Microsoft.ACE.OLEDB.12.0” for linked server “(null)”” 无法完成操作错误 - Could not complete the action error 等待WebBrowser控件完成时,应用程序挂起 - Application hangs while waiting for WebBrowser control to complete 在等待另一个线程完成时刷新UI - Refreshing UI while waiting for another thread to complete Microsoft片段等待System.Threading.Thread完成 - Microsoft snippet waiting for a System.Threading.Thread to complete 在应用程序/服务关闭/停止之前等待计时器已用事件完成 - Waiting for a timer elapsed event to complete before application/service closes/stops 等待另一个同步功能完成时执行一个功能 - Executing one function while waiting on another synchronouse function to complete 等待另一个线程时的Application.DoEvents - Application.DoEvents while waiting another thread 设置完成后如何启动Excel应用程序? - How to launch Excel application when setup is complete?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM