I am interested in using C# to manipulate/Automate Excel files.
After browsing the web I have actually found VSTO however it seems you can not use that in Visual Studio Express Edition so I can not utilize that.
Just couple of minutes ago I discovered a concern in this site that utilized this namespace in its code:
Microsoft.Office.Interop.Excel, if you don’t want to add the reference to this COM, you can use an alternative library http://www.iditect.com/product/excel/ to edit Excel using C# in .NET application.
So I am wondering if all I have to utilize that is include required referral and if so which referral to include?
I installed “Main Interop Assemblies” as the accepted answer recommended but for some reason they are still missing out on in the Add Recommendation dialog under “. NET” but they exist in GAC.
So I simply added the recommendation utilizing “Browse” and located Microsoft.Office.Interop.Excel.dll in GAC folder.
Looking for comparable concerns on this website regarding adding referral from GAC it seems this is not advised.
These are readily available as “Main Interop Assemblies”, which can be set up with Workplace, or downloaded and set up independently. How to: Set Up Workplace Main Interop Assemblies.
As soon as those are set up, you can reference them in your task in the Include Recommendation dialog, under.NET. If you do not see those Microsoft.Office.Interop assemblies listed, then they have not been set up yet. Install them from your setup, or download and install them individually (see my link above for the downloads).
Those are COM services that Visual Studio can generate.NET interop assemblies for. It is not advised that you utilize those; you should utilize the PIA assemblies launched from Microsoft. They must show up in the.NET tab in the Include References dialog.
I guess exactly what you are aiming to do is add Microsoft.Office.Interop.Excel with using statement with out adding its reference in your application, because case it wont be discovered. Prior to calling it with using declaration you need to include a referral to ur application. Right click on Referrals and add the Excel Interop reference.
You should be able to add a referral to Interop.Excel if you have Microsoft Workplace installed.
For instance, the PC I’m typing this on has MSVS 2010 C# Express and Workplace 2010. I can add a recommendation to Microsoft.Office.Interop.Excel 188.8.131.52.
The best option considering that workplace 2007 is utilizing Open XML SDK for it. We utilized Word.Interop however it stop in some cases, and it is not advise for Microsoft, to utilize it as a server side file format, so Open XML SDK lets you develops word documents on DOCX and Open XML formats very easily.
I just had the exact same problem, however none of these answers helped me. I did find the dll on my pc in the area Mostey kept in mind: (C: \ Windows \ assembly \ GAC_MSIL \ Microsoft.Office.Interop.Excel \ 184.108.40.206 \ Microsoft.Office.Interop.Excel.dll), but this is not the one that was referenced in the project I was aiming to get structure.
The reference in our project in Visual Studio 2012 was pointing to C: \ Program Files (x86)\ Microsoft Visual Studio 11.0 \ Visual Studio Tools for Office \. This area was empty for me, however it worked fine for everybody else. It took a variety of tries, however I lastly located a working installer.