Class not registered error when creating Excel workbook in C#

前端 未结 8 855
梦毁少年i
梦毁少年i 2021-02-02 07:35

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

8条回答
  •  春和景丽
    2021-02-02 08:17

    We had the same problem.

    Our setup is like this :
    Office 2010 : Word and Excel but Office 2013 : Outlook

    We ran the installation program for Office 2010 and choose the repair option. After that, all the wrong keys in the registry for Word and Excel were deleted and the problem was solved.

提交回复
热议问题