When I try to access an Excel spreadsheet using the following code I get a \"Library not registered\' error when defining the workbook object wrkbuk using C# from Visual Studio
The registry hack described above fixed the same problem for me. The only difference was I had a 1.9 and a 1.7 entry. I deleted the 1.9 key and my problem was fixed.
Other info:
OS: Windows 10
Visual Studio Professional 2015
C# Windows Form Application
This was on my work laptop. We have Office 2010 installed on each workstation.
Some other things I tried that DID NOT WORK were the following:
Repairing MS OFFICE
Reinstalling MS OFFICE
Downloading Microsoft Office 2010: Primary Interop Assemblies from Microsoft.
I also had several versions of the Microsoft.Office.Interop.Excel.dll on my laptop. Deleting previous versions did not fix the problem.
Glad I went to STACKOVERFLOW.COM because this place ROCKS!!!!!!