如何从MS Visual Studio 2010中的“添加引用”添加microsoft excel 15.0对象库 [英] How to add microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010

查看:88
本文介绍了如何从MS Visual Studio 2010中的“添加引用”添加microsoft excel 15.0对象库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何在MS Visual Studio 2010中添加Microsoft Reference excel 15.0对象库。







我在Windows 8操作系统上工作。



Office 2013安装在机器上。



访问特定的COM组件。

我已经安装了Microsoft Office 2010:我的计算机上可再发行的主互操作程序集。



仍然无法在ms中找到上面的COM组件工作室2010.



我是否需要在我的机器上安装MS Office 2010.





感谢和问候

sam

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

推荐答案

是的,您必须安装Office才能获得Office互操作程序集。安装Office时,这些程序集将转到GAC,因此您可以使用Visual Studio添加引用窗口的.NET选项卡添加引用。当然,用户的计算机也应安装Office。



由于许可限制,这可能是不可接受的。或者,您可以使用Open XML SDK:



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



这样,您可以支持新的基于XML的Office格式(例如.DOCX,.XLSX),ECMA-376标准:

http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats [ ^ ],

http://en.wikipedia.org/wiki/Office_Open_XML [ ^ ]。



这样,您可以在没有安装Office的情况下工作。此外,第三方软件支持这些文档。请查看我过去的答案:

将Office文档转换为PDF而不互操作 [ ^ ],
需要一个相当独特的WPF文本编辑器控件 [ ^ ],

您好如何使用c#.net 在Windows应用程序中显示word文件[ ^ ],

阅读没有使用Interop.word dll的word文件...不想在IIS中安装单词。 [ ^ ]。



这是另一种选择: http://npoi.codeplex.com/ [ ^ ]。



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







另见Mika Wende撰写的CodeProject文章lius:使用Open XML创建基本的Excel工作簿 [ ^ ]。



-SA
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[^].



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

—SA


如果你需要在视觉工作室安装相同的计算机拥有32位视觉工作室,然后安装32位msoffice,无需降级到msoffice 2010.
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.


这篇关于如何从MS Visual Studio 2010中的“添加引用”添加microsoft excel 15.0对象库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆