is Office actually installed? and do the bitness (32/64) match?
Regarding using Excel = Microsoft.Office.Interop.Excel
We have built DLL using 32 bit and when calling through application, we are getting error - "Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from h: 0x80040154 (REGDB_E_CLASSNOTREG))."
We have built DLL with following settings -
<TargetFramework>net472</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<PlatformTarget>x86</PlatformTarget>
Also tried following on Windows Server-
C:\Windows\Microsoft.NET\Framework>%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\regasm.exe WSI.Xceptor.MergeExcelInputFiles.dll /regfile:mytest.reg
Microsoft .NET Framework Assembly Registration Utility version 4.8.3761.0
for Microsoft .NET Framework version 4.8.3761.0
Copyright (C) Microsoft Corporation. All rights reserved.
RegAsm : warning RA0000 : No registry script will be produced since there are no types to register
C:\Windows\Microsoft.NET\Framework>%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\regasm.exe WSI.Xceptor.MergeExcelInputFiles.dll /tlb:mytest.tlb
Microsoft .NET Framework Assembly Registration Utility version 4.8.3761.0
for Microsoft .NET Framework version 4.8.3761.0
Copyright (C) Microsoft Corporation. All rights reserved.
Assembly exported to 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\mytest.tlb', and the type library was registered successfully
Please let me know steps to resolve the issue.