'How to solve Microsoft.Office.Interop.Excel .net Standard "Could not load file or assembly" Exception?
I've checked many posts and references about this but still cannot solve it.
I have a .Net Standard project that references Microsoft.Office.Interop.Excel. Everything is fine up until the runtime where I want to initiate an excel (read and/or write) and I get this exception:
'Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. The system cannot find the file specified
It works fine on .NET Framework 4.6.1 but it does not on .net core and standard.
What do I do to fix this?
Solution 1:[1]
I found out that it was because I use .NET Core. I should use COM reference too.
The answer that helped me is here .NET core 3.0 and MS Office Interop
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | E-A |

