I am using Office Interop Excel Library to Export data from Gridview to Excel sheet in my project.I published the application & deployed on IIS 7.0.But when I am accessing this functionality the below error is throwing:
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)).
Please suggest me.
Loading
Sharon ThompsonPosted Apr 13, 2015, 5:06 AM
Do you have MS Excel installed on that machine (note that it is a requirement when you are using Excel Interop in C#)?
Nevertheless I would also advise you to read this, it explains why it is not a good idea to use office automation on server side, so instead why don't you try this Excel library for C# applications. You can achieve the same conversion of HTML content to an Excel file in C# and export that Excel file to an ASP.NET client.
Also here is a demonstration sample how you can do that.