Dynamo icon indicating copy to clipboard operation
Dynamo copied to clipboard

Excel Interop - Invalid Input type to make AST Node

Open miguelmaso opened this issue 2 years ago • 2 comments

Dynamo Version

2.17

Host

No response

Operating System

Windows 10

What did you do?

I'm trying to create an Excel Workbook with a Zero Touch Node.

            Microsoft.Office.Interop.Excel.Application excel_app = new Microsoft.Office.Interop.Excel.Application();
            Microsoft.Office.Interop.Excel.Workbook workbook = excel_app.Workbooks.Add(); // This line is creating the issue
            Marshal.ReleaseComObject(workbook);
            Marshal.ReleaseComObject(excel_app);

What did you expect to see?

Load the library as usual.

What did you see instead?

The library could not be loaded.

What packages or external references (if any) were used?

Microsoft.Office.Interop.Excel
System.Runtime.InteropServices

Stack Trace

image

Details

No response

miguelmaso avatar Feb 01 '24 18:02 miguelmaso

tracked internally DYN-6675

avidit avatar Feb 01 '24 18:02 avidit

I'm guessing COM interop types are being embedded? Please first see these resources and then share a GitHub repo that reproduces the issue if the resources don't help.

https://github.com/DynamoDS/Dynamo/wiki/Using-COM-(interop)-types-in-dynamo-packages https://forum.dynamobim.com/t/fail-to-load-two-packages-access-to-the-same-api/83556/6

mjkkirschner avatar Feb 01 '24 22:02 mjkkirschner