Scenario: Trying to launch Excel with “Excel application scope” but immediately get the following error:
“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)).”
Same error when trying to use Outlook through UiPath. Both applications work when using them outside UiPath.
Steps to reproduce:
Current Behavior:
Expected Behavior:
Studio/Robot/Orchestrator Version: UiPath Studio 2017.1.6435, Excel 2016 (16.0.8201.2200) 64-bit
Last stable behavior: Never worked.
Last stable version: -
OS Version: Windows 10 Enterprise
Others if Relevant: (workflow, logs, .net version, service pack, etc): I have tried to find solutions online, I have checked registry editor for multiple office entries, I have repaired and even reinstalled Office and UiPath without luck.
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.
Hello Affster, your solution seems to be the only solution so far for this Excel not working problem. Could you please provide more detailed steps for solving this problem through regedit? Which value to search for? Where do I find the TypeLib-key for Excel?
Thanks in advance for providing this explanation, I am stuck with not being able to read Excel files in UIPath. Martin de Groot
Did some digging because I have the same error (for Excel and Outlook). The path for the folders in question within regedit:
Excel:
HKEY_CLASSES_ROOT → TypeLib → {00020813-0000-0000-C000-000000000046}
Outlook:
HKEY_CLASSES_ROOT → TypeLib → {00062FFF-0000-0000-C000-000000000046}
Under each of these you have folders regarding various office versions.
But I only have a 32 bit office installed and for the last couple of weeks none of my office interactions are working anymore. On our machines with 64 bit versions of office this problem is not happening (we are currently upgrading to office 365, though our robot machines are not having their offices upgraded).
Could this be a mismatch between office versions and/or uipath package integration of these?
Is there any solution for this problem? I’m already trying this solution from other thread in this forum or another forum but with no avail. The error keep occurred.
Below is the solution that i already tried and still not solved the problem
Add the variable environment in windows (excel path)
Add excel path in Registry editor within user laptop
Adding kill process for excel in robot at the beginning and at the end each robot
(to clear the cache excel in the computer)
Found the solution within forum Uipath and other forums)
Disable add-ins in excel 2016
Found the solution within forum Uipath and other forums)
Repair the microsoft office
I think even when we reinstall the microsoft office the error will keep occurred because the principle just same with repair.
if you have any suggestion or solution for this problem please shared with me.