I am trying to get Data from an Excel File with vb.net. I am using VS2019, Excel 2019 and the Microsoft Excel 16.0 Object Library. When I try to run my code I get the following error:
System.IO.FileNotFoundException HResult=0x80070002 Nachricht = Could not load file or assembly 'office, Version=22.214.171.124, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.
This is how I try to access Excel:
Dim excelApp As New Microsoft.Office.Interop.Excel.Application Dim worksheet As Microsoft.Office.Interop.Excel.Worksheet Dim workbook As Microsoft.Office.Interop.Excel.Workbook Dim excelLength As Integer
While I did not find anything specific to my situation it looks like the problem might stem from a incompatible version, but I'm not sure if it is my version of Excel or the COM-Object I'm using.
User contributions licensed under CC BY-SA 3.0