System.Runtime.InteropServices.COMException error on server work on local host

-1

code work on local host but on server get following error

System.Runtime.InteropServices.COMException (0x80040154): 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 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at WBulkPartEntry.ImportFile(String dataValue)

My Code is here

Excel.Application xlApp = new Excel.Application();

Excel.Workbook xlWorkbook = xlApp.Workbooks.Open(FilePath, 0, true, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);

Excel._Worksheet xlWorksheet = (Excel._Worksheet)xlWorkbook.Sheets[1];

Excel.Range xlRange = xlWorksheet.UsedRange;
c#
asp.net
asp.net-web-api
asked on Stack Overflow Sep 24, 2018 by Avichal Gupta • edited Sep 24, 2018 by Suhas Bachhav

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0