Tamil keyboard for laptop windows 10. ✻ Portions of file data provided by Exiftool (Phil Harvey) distributed under the Perl Artistic License.
While working with Microsoft.Office.Interop.Excel.Application it usually happens that the code works while debugging but after publishing it stops working or throws exception or the page setup properties wont work. I had developed a system that deals with excel sheets in 2006 using MS VS 2005. Now, I can not use the same reference with MS VS 2012. Var app = new Microsoft.Office.Interop.Excel.Application. Hi, I have an application that uses excel to view some data, however the application may be installed on pc's that do not have office installed - this is ok, and the excel functionality will simply be disabled. The problem i have is when the application starts and i navigate to the part of the. 1: Deploy the interop references to the machine 2.
With a wide range of PSI manufactured pellets available one can shoot target or hunt. The rifle is built with high quality materials and superior workmanship. Check out Jim Chapman's African Airgun Safari's.Picked out my guns for our upcoming trip to South Africa;Quackenbush.457Career Dragonslayer.50Evanix AR 6.22Prairie Falcon.22Review will be available on all of these guns in the coming weeks!
Active7 months ago
I had developed a system that deals with excel sheets in 2006 using MS VS 2005. Now, I can not use the same reference with MS VS 2012.
abatishchev
72.5k7070 gold badges270270 silver badges406406 bronze badges
Moe_AlMoe_Al
6 Answers
Use NuGet (VS 2013+):
The easiest way in any recent version of Visual Studio is to just use the NuGet package manager. (Even VS2013, with the NuGet Package Manager for Visual Studio 2013 extension.)
Right-click on 'References' and choose 'Manage NuGet Packages..', then just search for Excel.
VS 2012:
Older versions of VS didn't have access to NuGet.
VS 2008 / 2010:
56.9k88 gold badges8484 silver badges135135 bronze badges
You can also try installing it in Visual Studio via Package Manager.
Run
Install-Package Microsoft.Office.Interop.Excel in the Package Console.This will automatically add it as a project reference.
Use is like this:
MJH
2,12566 gold badges1414 silver badges2020 bronze badges
CYCLONECYCLONE
If you have VS 2013 Express and you cant find Microsoft.Office namespace, try this ('Microsoft Excel 12.0 Object Library' if you want to use Office 2007)
Microsoft Office Interop Excel Application Access DeniedMuflixMuflix
1,82466 gold badges3636 silver badges8383 bronze badges
Building off of Mulfix's answer, if you have Visual Studio Community 2015, try Add Reference.. -> COM -> Type Libraries -> 'Microsoft Excel 15.0 Object Library'.
Daniel.VenezianoDaniel.Veneziano
Instead of early binding the reference, there's an open source project called NetOffice that abstracts this from your project, making life much easier. That way you don't have to rely on your users having a specific version of Office installed.
LawManLawMan
You have to check which version of Excel you are targeting?
If you are targeting Excel 2010 use version 14 (as per Grant's screenshot answer), Excel 2007 use version 12 . You can not support Excel 2003 using vS2012 as they do not have the correct Interop dll installed.
mas_oz2k1mas_oz2k1
2,37222 gold badges2929 silver badges3838 bronze badges
Not the answer you're looking for? Browse other questions tagged c#excelreferencevisual-studio-2012vsto or ask your own question.Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |