Invoke Code With Excel Fails With Assembly Error

The Invoke code with Excel fails with assembly error.

Issue Description:
While using Microsoft.Office.Interop.Excel assembly reference, in the Invoke code activity. Added the reference in imports and in manage packages too. Still, whenever trying to reference this Excel assembly, the assembly reference missing error is thrown.

When using Invoke Code with Excel Interop assembly, we get an assembly reference missing error.

Resolution: To solve this, proceed as follows,

  1. Ensure to use Studio 22.10 or newer
  2. Remove the initialization of the Excel app from the invoke code block (but leave the rest as it is)
  3. Use an Assign activity before the Invoke Code activity and initialize the Excel app in it.



  1. With Studio 22.4, another error is thrown and hence it is recommended to use Studio 22.10 or higher.