Wednesday, 10 July 2013

VB.NET - how to fix error - Interop type 'ApplicationClass' cannot be embedded. Use the applicable interface instead.

Watch this example on YouTube


The following code will produce error
        Dim eApplication As ApplicationClass = New ApplicationClass()
        Dim eWorkbook As Workbook = Nothing

  Interop type 'ApplicationClass' cannot be embedded. Use the applicable interface instead.

In order to fix it - expend References, right click Microsoft.Office.Interop.Excel and set Embaded Interop Types to false

No comments:

Post a Comment