In one of our major Grasshopper scripts, we use the Microsoft.Office.Interop.Excel.dll in a number of places (using the Grasshopper “C# Script” component). I have the proper line of code to load the assembly at the beginning of the script:
// r "C:\Program Files\Microsoft Office\root\Office16\ADDINS\Microsoft Power Query for Excel Integrated\bin\Microsoft.Office.Interop.Excel.dll"
This worked on my coworker’s machine just last week, but now when he opens the GH script, the “C# Script” component is red and does nothing, giving the error:
Error running script (ExecuteException): Could not load file or assembly ‘office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’. The system cannot find the file specified.
We have made sure the Interop DLL is in the proper folder and unblocked. We have made sure his system is up to date, including .NET updates. Still no go.
Any help would be appreciated. Thanks.