【UiPath 问题 16 】Error openning workbook. Make sure Excel is installed

问题描述

使用 “Excel application scope” 打开 Excel 的时候 得到如下错误:
“System.Exception: Error openning workbook. Make sure Excel is installed —> System.InvalidCastException: Unable to cast COM object of type ‘Microsoft.Office.Interop.Excel.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Excel._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{000208D5-0000-0000-C000-000000000046}’ failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).”

解决办法

在注册表中找到 Win32 和 Win64 文件夹,删除其中一个。当你安装的是 Win32 版的 Excel, 删除 Win64 这个文件夹,以此类推

Excel 注册表位置:


【UiPath 问题 16 】Error openning workbook. Make sure Excel is installed_第1张图片

英文原文:
We need to remove Win32 entry, if we are using Office 64-bit. Or delete Win64 entry if we are using Office 32-bit

As I read that the problem was probably in regedit, I tried to find multiple entries of office but found nothing. Instead if I looked deeper into the TypeLib-key for Excel and Outlook there was a folder named “0” and inside that folders named Win32 and Win64. The problem is that I only have a Win64-installation of office, so I changed both keys values to match my current installation of EXCEL.EXE and MSOUTL.OLB. Now UiPath finds them.

该问题来自论坛
https://forum.uipath.com/t/error-opening-workbook-make-sure-excel-is-installed/15009

返回目录

更多 UiPath 相关的资讯,请关注公众号:流程自动化机器人教程
由于禁止直接在文章中插入公众号二维码,请点击 这里 了解添加该公众号的细节。

你可能感兴趣的:(【UiPath 问题 16 】Error openning workbook. Make sure Excel is installed)