Click here to Skip to main content
15,867,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Facing error on GoDaddy server when trying to read an Excel file.

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)).

How do we handle this when we upload a published copy over the net where we dont have access to web server.

Regards,
Arvind
Posted

1 solution

Excel is not installed on your server.

Additionally, using Office automation from non-interactive applications (eg: websites) is not supported:

Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.


You'll need to use a different approach to read the files.

You might be able to get away with using ODBC:
Reading Excel files using ODBC[^]

If your site only needs to support the newer file formats (.xlsx), then you could use EPPlus[^], ClosedXML[^], or the OpenXML SDK[^].

If you need to support older format files (.xls) as well, then you can use NPOI[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900