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

2 Answers 2

4

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?

Sign up to request clarification or add additional context in comments.

1 Comment

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

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.