문제

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