سؤال

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.

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

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?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top