Click here to Skip to main content
15,891,703 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi ,

How to add Microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010.



Am working on Windows 8 OS.

Ms Office 2013 installed on machine.

To access particular COM Component.
I have Installed Microsoft Office 2010: Primary Interop Assemblies Redistributable on my machine.

Still am unable to find above COM component in ms visual studio 2010.

Do i need to install MS Office 2010 on my machine.


Thanks & Regards
sam
Posted

Yes, you would have to install Office, to get Office interop assemblies. When Office is installed, those assemblies go to GAC, so you would add a reference by using the tab ".NET" of the Visual Studio "Add Reference" window. And of course, the user's computer should also have Office installed.

This can be unacceptable due to licensing limitations. Alternatively, you can use Open XML SDK:

http://www.microsoft.com/en-us/download/details.aspx?id=30425[^].

This way, you can support new XML-based Office formats (such as .DOCX, .XLSX), ECMA-376 standard:
http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats[^],
http://en.wikipedia.org/wiki/Office_Open_XML[^].

This way, you can work without Office installed. Also, the documents are supported by 3rd-party software. Please see my past answers:
Convert Office-Documents to PDF without interop[^],
Need a rather unique WPF text editor control[^],
Hi how can i display word file in windows application using c#.net[^],
Read a word file without using Interop.word dll...Do not want to install word in IIS..[^].

This is another option: http://npoi.codeplex.com/[^].

See also: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2[^].

[EDIT]

See also this CodeProject article by Mika Wendelius: Creating basic Excel workbook with Open XML[^].

—SA
 
Share this answer
 
v3
You just need to install same computing to your visual studio, if you have 32bit visual studio then install a 32bit msoffice, no need to downgrade to msoffice 2010.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900