3
votes

I am developing an Application using C#.NET in Window 7. The application generate excel document. In my system, Office 2010 had been installed.

Creating an instance of the COM component with CLSID {00024500-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010001.

2
How does it generate an Excel sheet? - Matthias Meid
i had the same error, and i think it's realted to windows 7 because i tried the same code on XP and it worked (i didn't fix the problem because someone else took it) so i don't know the answer - Alaa Jabre
Well, it looks like files are been generated using Office PIAS.. - Oscar

2 Answers

3
votes

You don't provide much information about. It's a web, a windows service or desktop application?

However, using com interop isn't needed any more to create Excel files in the new xml based format. See this:

http://excelpackage.codeplex.com/

Best regards.

2
votes

As Oscar have said, using Interop classes is not required for excel-file generation. Even Microsoft says you should not be doing that. There are other packages that can create xls or xlsx files for you. I have used NPOI in the past and was very happy with it.

27 Oct 2015 Update: NPOI has a is horrible API. Use OpenXml-based EPPlus - much more comfortable to work with and gives you a lot better code comparing to NPOI when producing the same documents.