views:

18

answers:

2
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.

i don't have ms-office in my system. I added the reference 'Microsoft.Office.Interop.Excel.dll' in my .net project(C# code behind). i get the above error FROM the BELOW line

Application excel = new Application();

when i have ms-office installed it works fine. i should work it out without installing ms-office. only by adding dll. help needed. Thanks in adv.

+3  A: 

This is the problem: "i should work it out without installing ms-office"

You cannot start Excel if not Excel is not installed (duh). What are you trying to do?

Andreas Paulsson
but i am referring the dll. it should take care of...
Bala
The dll is only an interop assembly that works as a proxy between Excel and .NET. It does not include excel itself. Use Open XML SDK to read or write Excel (xlsx) files without having Excel installed.
Andreas Paulsson
+1  A: 

Assuming you want to create or edit Excel Files, I recommend using the new Open XML SDK from Microsoft. Works better and is easier than Excel Interop.

http://blogs.msdn.com/b/excel/archive/2008/11/25/using-the-open-xml-sdk-to-work-with-excel-files.aspx

Remy