Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (5.3k points)

I've installed Windows 7 Enterprise SP1, .NET 4.7.1, SQL Server Express 2014, Blue Prism 6.0, Office 2010 Pro (32-bit). I just followed the default installation process for all the softwares and nothing else has been customized or changed in the OS. It's basically a vanilla installation.

When I try to use the Excel VBO action "Open Workbook", it fails with: "Internal : Could not execute code stage because exception thrown by code stage: Exception has been thrown by the target of an invocation".

Even if "Create Instance" is not mandatory to open a workbook, I've also tried to design the full workflow to make sure all inputs and outputs were provided.

See the workflow

See the details:

04/04/2018 10:15:12 START: 'Start' Process: 'Test' Subsheet: 'Action 1'

04/04/2018 10:15:13 ACTION: 'Create Instance' Process: 'Test' Subsheet: 'Action 1'

04/04/2018 10:15:13 START: 'Start' Process: 'MS Excel VBO' Subsheet: 'Initialise'

04/04/2018 10:15:13 END: 'End' Process: 'MS Excel VBO' Subsheet: 'Initialise'

04/04/2018 10:15:13 START: 'Start' Process: 'MS Excel VBO' Subsheet: 'Create Instance'

04/04/2018 10:15:13 CODE: 'Create Instance' Process: 'MS Excel VBO' Subsheet: 'Create Instance'

04/04/2018 10:15:13 SUBSHEET: 'Set Events Enabled' Process: 'MS Excel VBO' Subsheet: 'Create Instance'

04/04/2018 10:15:13 START: 'Start' Process: 'MS Excel VBO' Subsheet: 'Set Events Enabled'

04/04/2018 10:15:13 SUBSHEET: 'CheckInstanceHandle' Process: 'MS Excel VBO' Subsheet: 'Set Events Enabled'

04/04/2018 10:15:13 START: 'Start' Process: 'MS Excel VBO' Subsheet: 'CheckInstanceHandle'

04/04/2018 10:15:13 CODE: 'Check Handle' Process: 'MS Excel VBO' Subsheet: 'CheckInstanceHandle'

04/04/2018 10:15:13 DECISION: 'Is Handle Missing?' Process: 'MS Excel VBO' Subsheet: 'CheckInstanceHandle'

04/04/2018 10:15:13 END: 'End' Process: 'MS Excel VBO' Subsheet: 'CheckInstanceHandle'

04/04/2018 10:15:13 SUBSHEET: 'CheckInstanceHandle' Process: 'MS Excel VBO' Subsheet: 'Set Events Enabled'

04/04/2018 10:15:13 CODE: 'Enable Events' Process: 'MS Excel VBO' Subsheet: 'Set Events Enabled'

04/04/2018 10:15:13 END: 'End' Process: 'MS Excel VBO' Subsheet: 'Set Events Enabled'

04/04/2018 10:15:13 SUBSHEET: 'Set Events Enabled' Process: 'MS Excel VBO' Subsheet: 'Create Instance'

04/04/2018 10:15:13 END: 'End' Process: 'MS Excel VBO' Subsheet: 'Create Instance'

04/04/2018 10:15:13 ACTION: 'Create Instance' Process: 'Test' Subsheet: 'Action 1'

04/04/2018 10:15:14 ACTION: 'Open Workbook' Process: 'Test' Subsheet: 'Action 1'

04/04/2018 10:15:14 START: 'Start' Process: 'MS Excel VBO' Subsheet: 'Open Workbook'

04/04/2018 10:15:14 SUBSHEET: 'CheckInstanceHandle' Process: 'MS Excel VBO' Subsheet: 'Open Workbook'

04/04/2018 10:15:14 START: 'Start' Process: 'MS Excel VBO' Subsheet: 'CheckInstanceHandle'

04/04/2018 10:15:14 CODE: 'Check Handle' Process: 'MS Excel VBO' Subsheet: 'CheckInstanceHandle'

04/04/2018 10:15:14 DECISION: 'Is Handle Missing?' Process: 'MS Excel VBO' Subsheet: 'CheckInstanceHandle'

04/04/2018 10:15:14 END: 'End' Process: 'MS Excel VBO' Subsheet: 'CheckInstanceHandle'

04/04/2018 10:15:14 SUBSHEET: 'CheckInstanceHandle' Process: 'MS Excel VBO' Subsheet: 'Open Workbook'

04/04/2018 10:15:14 SUBSHEET: 'VerifyFileExists' Process: 'MS Excel VBO' Subsheet: 'Open Workbook'

04/04/2018 10:15:14 START: 'Start' Process: 'MS Excel VBO' Subsheet: 'CheckFileExists'

04/04/2018 10:15:14 CODE: 'File Exists?' Process: 'MS Excel VBO' Subsheet: 'CheckFileExists'

04/04/2018 10:15:14 DECISION: 'Does File Exist?' Process: 'MS Excel VBO' Subsheet: 'CheckFileExists'

04/04/2018 10:15:14 END: 'End' Process: 'MS Excel VBO' Subsheet: 'CheckFileExists'

04/04/2018 10:15:14 SUBSHEET: 'VerifyFileExists' Process: 'MS Excel VBO' Subsheet: 'Open Workbook'

04/04/2018 10:15:14 CODE: 'Open Workbook' Process: 'MS Excel VBO' Subsheet: 'Open Workbook' ERROR: Internal : Could not execute code stage because exception thrown by code stage: Exception has been thrown by the target of an invocation

04/04/2018 10:15:14 ACTION: 'Open Workbook' Process: 'Test' Subsheet: 'Action 1' ERROR: Internal : Could not execute code stage because exception thrown by code stage: Exception has been thrown by the target of an invocation.

The file exists, can be opened in Excel and other Excel actions works fine (for example: create instance, activate workbook, show). The exact same installation works correctly on Windows 10. I've also tried to install all the available Windows 7 updates, and Office x64, but nothing changed.

Any idea?

1 Answer

0 votes
by (12.7k points)

I just wrapped the OpenWorkbook code stage in a Try...Catch block and looked at the InnerException message. The error that came was:"Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))". By searching the error on the internet I found a mismatch between the Office language and the Regional Settings.

Interested in RPA ? Check out this RPA Certification by Intellipaat.

For more information visit :

Browse Categories

...