C# .NET - I can't find Microsoft.Office.Interop.Excel.dll. where is it?

Asked By MJ L on 06-Apr-10 10:24 PM
the result of googling is that is in "Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12"
so just copy that folder.

but My VS is version 8.0 and I can't found that folder (PIA) in C:\Program Files\Microsoft Visual Studio 8\Visual Studio Tools for Office

then, where I can find Microsoft.Office.Interop.Excel.dll?

I need interop excel.

thanks in advance.
Venkat K replied to MJ L on 06-Apr-10 11:00 PM
The better way is to search in your harddrive. This will give the exact path of that file.

If you are searching for VS version 8 then the path may be
Program Files\Microsoft Visual Studio 8.0\Visual Studio Tools for Office\PIA\Office12

Thanks
Asked By MJ L on 07-Apr-10 12:24 AM
I know how to add reference at project

I don't have interop.excel.dll file in my hdd
so where can I find one?
samjayander thiagarajan replied to MJ L on 07-Apr-10 01:17 AM
Hi,

Let me explain you some things first:
To be able to communicate to a COM component from .net, you have to create a COM wrapper for .Net.

So basically, there are two ways to create a COM wrapper. 
1) Easy thing, for example, in your case to work with EXCEL when add a reference to Excel object in .net, you will automatically get a Microsoft.office.Interop.Excel.dll generated for you.
2) You can use the TlbImporter utility to get the Interop class: http://msdn.microsoft.com/en-us/library/tt0cf3sx(VS.80).aspx

So, you can get the Interop dll from your project which uses that dll. Check for the Project's bin/debug or obj/debug directory and you can get the dll.

Regards,
Sam.
Santhosh N replied to MJ L on 07-Apr-10 02:57 AM
I suppose office PIAs are not installed and install form here.
http://msdn.microsoft.com/en-us/library/aa159923(office.11).aspx
also check this thread for troubleshooting the same
http://social.msdn.microsoft.com/Forums/en/netfxsetup/thread/c9e83756-4ae2-4ed4-b154-1537f3bb3a22
Cika Pero replied to MJ L on 08-Apr-10 04:07 AM
Hi,

do you have Microsoft Office installed?
Interop won't work without Excel app.

Try in this folder
'C:\Program Files\Microsoft.NET\Primary Interop Assemblies'
or
'C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies' for x64 machines.

But if you are building web app, you should avoid http://www.gemboxsoftware.com/LA/Excel-Automation-and-Excel-Interop.htm, even Microsoft discourages it in server environments:
http://support.microsoft.com/kb/257757

For http://www.gemboxsoftware.com/LA/ASP-.NET-Excel.htm applications I recommend you take a look at this http://www.gemboxsoftware.com/GBSpreadsheet.htm library.

You could this excellent Excel C# library that doesn't have this versioning issues

MJ L replied to Santhosh N on 08-Apr-10 08:42 PM
thank you.
thanks to you. I solved this problem.
thanks so much.
Santhosh N replied to MJ L on 10-Apr-10 12:30 AM
cheers...
Dalia replied to MJ L on 10-Jun-11 11:29 AM
Hi,

Can I ask, how did you solve the problem?
My problem is on the development machine, I have everything working C#2010 and Office 2007.
On the client machine, we have only office 2003 and I am facing issues creating the excel object

So, can you give me some info about what to do, given that I can't install any software on the client machine

Thnaks in advance for your help,
Dalia
Jean Hough replied to MJ L on 12-Aug-11 03:59 PM
Hello,

Here is the Microsoft.Office.Interop.Excel.dll : http://dllcentral.com/microsoft.office.interop.excel.dll/12.0.6425.1000/…download it and then extract the downloaded zip file to the system32 folder which is located in windows folder (that is located in your main drive which contains the installed windows)