What troubleshooting steps need to be taken in order to resolve the issue "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)" in Excel?
Description:
If an Excel crashes with error message "The RPC server is unavailable" and the HRESULT code 0x800706BA while working with UiPath and Excel.
Root Cause: One of the possible causes of this error is when output is taken from a variable from the Excel Application Scope, and then the Excel instance is closed (in any way available, by either closing it via activities or killing the process) and then the same variable is used later on in another Excel Application Scope.
Resolution: This can be avoided by not closing the processes that generated the output variable.
If the above does not resolve the error, then try the below approaches:
- Upgrade the Excel Package:
- Update the Excel package in your UiPath project to the latest version available. This can help ensure compatibility and resolve any known issues related to the RPC server error.
- Enable Visible Check for the Faulted Excel Scope:
- To enable the visible check for the faulted Excel scope, follow these steps:
- Open the UiPath project
- Locate the Excel scope activity where the error occurs.
- In the Properties panel, check the "Visible" option to make the Excel application visible during execution. This allows better monitoring and error handling.
- Perform a Repair Action from Studio:
- To repair the Microsoft Office Interop component from UiPath Studio, follow the instructions provided in the current version of the UiPath documentation. Refer to Microsoft Office Issues .
- Perform a Repair Action from the Application: If the issue persists, repair the Excel application itself. Follow the instructions provided by Microsoft on how to repair an Office application.
- Consider Uninstalling and Reinstalling Excel:
- If repairing doesn't resolve the issue, you may want to uninstall the Excel application and then reinstall it. This process is similar to a repair action and can help resolve any underlying issues. See How To Uninstall Individual Office 365 Apps From Windows 10/11 (intowindows.com) for detailed instructions.
- Check for Multiple Sessions:
- If you have multiple Excel sessions or processes running simultaneously, it can cause conflicts and lead to the RPC server error. Ensure that you have only one Excel instance open at a time when working with UiPath.
- It can be achieved by implementing close application activity inside each scope.
- Create a New Process with Windows Compatibility:
- To resolve any compatibility issues between Excel and the system, create a new process with Windows compatibility settings. Follow these steps:
- Create a new process in UiPath.
- In the properties of the process file, navigate to the "Compatibility" tab.
- Enable Windows compatibility mode and select an appropriate version.
- Save the changes and test the new process with Excel activities.
- To resolve any compatibility issues between Excel and the system, create a new process with Windows compatibility settings. Follow these steps:
- Replace Excel Application Scopes with Excel Process Scope:
- Replace the Excel Application Scopes in your workflow with the Excel Process Scope activity. This allows for better control and management of the Excel process.
Note: Make sure to create a complete backup of the current process before making any changes.