DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.73k stars 632 forks source link

Import Excel Exception Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=15.0.0.0 #11632

Open mohd-dxb opened 3 years ago

mohd-dxb commented 3 years ago

Hi,

I'm not able to Read Excel from Dynamo Sandbox 2.10 or 2.11. I'm getting this error: image I downloaded latest v15 Microsoft.Office.Interop.Excel.dll from Nuget and pasted in DynamoSandbox folder but still the same issue.

Thanks & Regards,

github-actions[bot] commented 3 years ago

Hello Kulkul7536, thank you for submitting this issue! We are super excited that you want to help us make Dynamo all that it can be. However, given that there has been no additional information added, this issue will be closed for now. Please reopen and provide additional information if you wish the Dynamo team to investigate further.

Additional information:

mohd-dxb commented 3 years ago

Hi,

I'm not able to Read Excel from Dynamo Sandbox 2.10 or 2.11. I'm getting this error: image I downloaded latest v15 Microsoft.Office.Interop.Excel.dll from Nuget and pasted in DynamoSandbox folder but still the same issue.

Thanks & Regards,

mjkkirschner commented 3 years ago

Hi @Kulkul7536 - I think theres a few things going on.

  1. can you try installing https://www.microsoft.com/en-us/download/details.aspx?id=3508
  2. what version of excel do you have installed? Can you try repairing the install, and making sure you install interop assemblies with it - it may be an option during install.
  3. checkout hints here: https://knowledge.autodesk.com/support/revit-products/troubleshooting/caas/sfdcarticles/sfdcarticles/Warning-Data-ImportExcel-operation-failed-Could-not-load-file-or-assembly-Microsoft-Office-Interop-Excel-when-running-the-Dynamo-script-in-Revit.html
  4. when you copy the dll from nuget - make sure you unblock it. - I don't have faith in this solution.
mohd-dxb commented 3 years ago

Hi @mjkkirschner

Thanks for replying,

  1. Yes i did try installing https://www.microsoft.com/en-us/download/details.aspx?id=3508. Still the same error.
  2. Office 2013.
  3. I tried to repair excel like shown on the link but i din't find any dll files in C:\Windows\Assemblies...
  4. Not sure what you mean by copy the dll from nuget?

Best Regards, ~Kulkul

mjkkirschner commented 3 years ago

Hi @Kulkul7536 you said:

I downloaded latest v15 Microsoft.Office.Interop.Excel.dll from Nuget and pasted in DynamoSandbox folder but still the same issue.

I don't think that is a great solution because:

please see this thread regarding 2013: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/3c74d31d-9c2a-49a4-accf-135267f11984/where-to-find-office-2013-pias-for-install?forum=vsto

it sounds like there is a particular checkbox during install to look for.

mohd-dxb commented 3 years ago

Hi @mjkkirschner

I downloaded v15 because of the exception, it requires v15. Another thing i noticed Excel node works fine with Revit 2019-2021. I get this excel error with Revit 2022, DynamoSandbox 2.10 and DynamoSandbox 2.11. I hope there has been no changes in the development in newer versions?

When i click on Change i get these checkboxes: image And when i click on Add/Remove Features i get these. I installed them but still the same error: image

mjkkirschner commented 3 years ago

Yes, that seems to be the option .Net Programmability Support, is it installed?

mohd-dxb commented 3 years ago

Yes it is installed but i didn't find any assembly: image And when i run dynamo the same exception appears.

mohd-dxb commented 3 years ago

@mjkkirschner any other workaround?

mjkkirschner commented 3 years ago

Not that I know of @Kulkul7536 - I think we need to find out why your excel install refuses to install the interop binaries as part of it's install or repair process.

There could be some group policy on the machine to stop this feature from working I think.

Otherwise you can try your original solution by getting the binary from nuget - but make sure to unblock the resulting binary.

mjkkirschner commented 3 years ago

@Kulkul7536 we just saw this internally on a system, and a restart and excel update fixed it. Maybe give that a shot?

mohd-dxb commented 3 years ago

Thanks @mjkkirschner nah restarting didn't fix. Excel Update - How can I update excel alone?