tags:

views:

285

answers:

1
+1  Q: 

Export to Excel

Hi,

I am using SpreadsheetClass to write some data to a excel sheet through c# code.

It was working fine. Now it has started giving an error in this line.

SpreadsheetClass xlsheet = new SpreadsheetClass();

Eroor is Retrieving the COM class factory for component with CLSID {0002E510-0000-0000-C000-000000000046} failed due to the following error: 80040154.

Please help.

+1  A: 

In general error 80040154 indicates a required component is not properly registered on the machine attempting to call it. I gather from the CLSID that the problem is with Excel 2000 (?).

The simplest explanation is that you're running the program on a machine that doesn't have Excel installed, or at least not the same version of Excel you used on the machine you developed the program on. If this isn't the case I'd look closely at your Excel Interop settings and verify nothing's changed. If you get desperate, I suppose you can run a repair on your Excel installation, or even uninstall/reinstall Excel.

Jay Riggs
I guess u r right. I had a professional edition of MS office when i developed the application. Then it was changed to standard edition.
Shetty