Blue Prism执行Open Workbook操作失败问题求助
Hey Andrea, let's dig into this frustrating Excel VBO error you're encountering. Given your default-installed setup (Windows 7 Enterprise SP1, .NET 4.7.1, 32-bit Office 2010 Pro, Blue Prism 6.0), here are targeted fixes to resolve the code stage exception:
1. Ensure Blue Prism and Office Bitness Match
Blue Prism relies on Office's COM interop components, which require matching bitness. Since you're running 32-bit Office 2010, Blue Prism must also be 32-bit:
- Check your Blue Prism installation folder:
C:\Program Files (x86)\Blue Prism Limitedconfirms 32-bit;C:\Program Files\means 64-bit. - If you have the 64-bit version, uninstall it and reinstall the 32-bit variant of Blue Prism 6.0.
2. Re-register Office Excel COM Components
Default Office installs sometimes fail to register critical COM components properly. Fix this by running these commands as Administrator:
- Open Command Prompt (Admin)
- Navigate to Office 2010's installation directory:
cd "C:\Program Files (x86)\Microsoft Office\Office14" - Register the required components:
regsvr32.exe Excel.exe regsvr32.exe OLEAUT32.dll - Restart your machine and retest the "Open Workbook" action.
3. Validate Excel VBO Configuration
Double-check the parameters in the "Open Workbook" action:
- Use a full absolute file path (e.g.,
C:\Documents\YourFile.xlsx) instead of relative paths to avoid resolution errors. - Temporarily set the
Visibleparameter toTrue—hidden Excel instances can trigger permission or initialization issues. - Ensure the
Use Excel Instanceparameter is correctly set: if you're referencing an existing instance, confirm it's properly initialized in a prior action.
4. Run Blue Prism with Elevated Privileges
Windows 7's UAC may block Blue Prism from interacting with Office components:
- Right-click your Blue Prism shortcut and select Run as administrator to test.
- If this works, set the shortcut to always run elevated: go to Properties > Advanced > Check "Run as administrator".
5. Repair .NET Framework 4.7.1
Corrupted .NET files often cause code stage exceptions in Blue Prism:
- Open Control Panel > Programs and Features
- Locate Microsoft .NET Framework 4.7.1, right-click it, and select Change > Repair
- Restart your machine once the repair completes.
6. Adjust Excel Trust Center Settings
Office 2010's security settings might be blocking Blue Prism's access:
- Open Excel 2010, go to File > Options > Trust Center > Trust Center Settings
- Under Macro Settings, temporarily select Enable all macros (only for testing—adjust back to a safer setting once the issue is resolved)
- Check Add-ins to disable any suspicious COM add-ins that could interfere with interop.
7. Check Blue Prism's Detailed Logs
The generic error message is vague—look at Blue Prism's log files (typically in C:\ProgramData\Blue Prism Limited\Blue Prism\Logs) for the full exception stack trace. This will reveal specific issues like missing interop assemblies, file access permissions, or initialization failures.
内容的提问来源于stack exchange,提问作者Andrea Passione

