Unfortunately you need to have Microsoft Excel installed in order to have access to the Introp libraries that you need to add as references to your project in order to make it work.
You need to install MS Excel on your server to ensure that Interop.Excel works fine. One alternate can be that you use OpenXML format to generate excel reports, for details see:-
robinspaul
Member
180 Points
479 Posts
How to use Microsoft.Office.Interop.Excel without installing Microsoft Office?
Dec 09, 2010 12:14 PM|LINK
Hi,
My server administrator does not allow me to install Microsoft Office in the server.
I have developed a website which converts XML files to Excel and it is using Microsoft.Office.Interop.Excel.
Is there any way I can run this application without installing Microsoft Office in the server?
Thanks,
prasadP
Contributor
5266 Points
771 Posts
Re: How to use Microsoft.Office.Interop.Excel without installing Microsoft Office?
Dec 09, 2010 12:32 PM|LINK
Hi Friend,
Unfortunately you need to have Microsoft Excel installed in order to have access to the Introp libraries that you need to add as references to your project in order to make it work.
http://social.msdn.microsoft.com/Forums/en/netfxsetup/thread/b4026f0b-c3a3-4b80-81df-5175e866ae8f
Try using some other alternative
NPOI - Which is free and open source.
Aspose - Is definitely not free but robust.
Spreadsheet ML - Basically XML for creating spreadsheets.
Blog
sachingusain
Star
8786 Points
1702 Posts
Re: How to use Microsoft.Office.Interop.Excel without installing Microsoft Office?
Dec 09, 2010 12:45 PM|LINK
There is no way you can do it without installing it.
If you are forced to and have an option to look at 3rd party vendors then you can evaluate Aspose.
I am using it and its pretty easy to start with with little learning curve and it removes the dependency on Microsoft's interop.
Thanks.
robinspaul
Member
180 Points
479 Posts
Re: How to use Microsoft.Office.Interop.Excel without installing Microsoft Office?
Dec 09, 2010 04:06 PM|LINK
Do I need to install the entire Microsoft Office? If it is just a few assemblies or libraries my administrator will allow it.
Can I make a dll of Microsoft.Office.Interop.Excel and put it in my bin folder?
sachingusain
Star
8786 Points
1702 Posts
Re: How to use Microsoft.Office.Interop.Excel without installing Microsoft Office?
Dec 09, 2010 04:55 PM|LINK
If you need to use just Excel then install excel only.
Thanks.
sirdneo
All-Star
15171 Points
2509 Posts
Re: How to use Microsoft.Office.Interop.Excel without installing Microsoft Office?
Dec 09, 2010 08:44 PM|LINK
You need to install MS Excel on your server to ensure that Interop.Excel works fine. One alternate can be that you use OpenXML format to generate excel reports, for details see:-
http://zeeshanumardotnet.blogspot.com/2010/08/creating-advanced-excel-2007-reports-on.html
Zeeshan Umar
~Please Mark As Answer, one or multiple posts, which helped you. So that it might be useful for others~
teddy_q
Member
712 Points
139 Posts
Re: How to use Microsoft.Office.Interop.Excel without installing Microsoft Office?
Dec 09, 2010 09:10 PM|LINK
You can also use the fake excel method. See this post
http://forums.asp.net/t/1625509.aspx
CikaPero
Member
54 Points
36 Posts
Re: How to use Microsoft.Office.Interop.Excel without installing Microsoft Office?
Mar 29, 2011 09:04 AM|LINK
Hi,
using Excel Interop is not recommended in server environments, even by Microsoft.
If you are looking for reliable and fast Excel C# / VB.NET library, I recommend GemBox.Spreadsheet.