1

Urgent Help Reqired!!!

I am working on an ASP.NET Webforms application that reads MS Excel spreadsheets and loads the data into SQL Server. The application works fine on Win Server 2003 (Which has MS Office installed).

During our migration of the software onto a Win Server 2008 (Which does not have MS Office installed) the application fails with a COM error message, "Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154".

This I assume is because even though we have the Microsoft.Office.Interop.Excel.dll within the applications sub directories the application cannot find the Excel application.

Now, here is the problem. Our infrastructure team refuses to install MS Office or Excel onto the server. They are adamant in their claim that there are work-arounds out there that will allow the application to work with Excel without the installation of ms office or excel.

Personally, I have never come accross any such solutions and from articles that I have read seem to confirm this???

Does anybody know if there is any way to get an ASP.NET application working with MS Excel, when MS OFfice or Excel is not installed?

2
  • what does working with MS Excel means, just reading excel files ? Commented Jan 21, 2013 at 12:19
  • Yes. The ASP.NET application opens up a Excel spreadsheet and retrieves data from the various sheets within the book? Commented Jan 21, 2013 at 12:52

1 Answer 1

2

MS do not support the interop of office for ASP.Net http://support.microsoft.com/kb/257757 since it may exhibit unstable behaviour.

There are quite a few libraries out there to allow you to work with Excel documents without installing Excel, for example: NPOI, MS Open XML SDK and EPPlus

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

6 Comments

Thanks! Would you know if it is possible to just take the Excel runtime and related dll's and place them onto a server in order to make it work??
I always thought that when you developed an application. VS would include all the related dll's required to run the application into your applications folder? Is there a way to get it to include the necessary Excel files?
Why would you want to when there are other options available which will likely preform much better?
It's just to avoid making changes to the underlying .NET code. As any code changes will have to go through a whole lot of internal processes. Also, our company only uses Microsoft products and will not consider using non-microsoft products?
interop on server is nothing but trouble, try to test it with some traffic, it would fail spectacularly, go with the Kyle's suggestions
|

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.