开始VSTO开发
我很困惑 VSTO 所需的工具是什么发展。具体来说,我想以编程方式操作 Excel 2003/2007 文档。如果您想与此相关的任何答案,我之前做了很多 VBA 。
我对 VSTO 有几个问题:
- 我可以使用 Visual Studio 2008 Express Edition C#/C++ 来实现此目的吗?
- 我需要安装 .NET 框架吗?
- 生成的 VSTO 程序是否需要在同一系统中安装 Office 副本才能运行?
直接链接到相关工具/插件/IDE 将不胜感激。
注意:我对 VSTO 和 .NET 完全陌生,但是是 Office 高级用户。我有 COM 编程经验。
I'm quite confused with what are the necessary tools for VSTO develpment. Specifically I want to manipulate Excel 2003/2007 documents programmatically. I did quite a lot of VBA before, if you want to relate any answer to that.
Few questions I have about VSTO:
- Can I use Visual Studio 2008 Express Edition C#/C++ for this?
- Do I need to have .NET framework installed?
- Does the resulting VSTO program need to have a copy of Office installed in the same system to run?
Direct links to the relevant tools/plugins/IDE will be appreciated.
Note: I'm totally new to VSTO and .NET but an Office power user. I have experience with COM programming.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,它可能会让人困惑,特别是考虑到跳过级别的命名约定等。本质上,您需要:
Studio 和您所针对的 .NET 版本。
2005、VSTO 2005 SE、VSTO 2008、VSTO
2010)。对于你的要求,VSTO
2005 SE 可能是您最好的选择。
需要更多,例如您的目标 PIA 和 .NET 版本。对于 VSTO 2010,您不需要 PIA(只是您正在使用的内容将自动与您的应用程序打包)。
一些提示:
转向 VSTO 应该是一个平稳的过程
如果您已经在很大程度上使用了 .NET。
任何给定程序的模型(Excel、
PowerPoint等)可能有一些
更多做事的方式
与 VBA 不同/更好
对象模型的版本。为了
例如,Bookmark 控件
VSTO 2008 中的单词与
与生俱来的
通过 VBA 访问。
这就是 Visual Studio 2010 的 VSTO 不需要您的原因
包含完整的互操作 (PIA) 文件
和你的包裹。
办公室用同样的解决方案不是
官方支持 pre-VSTO 2010。有多种方法
围绕这个问题,有些人
已经谈论过,但你不会得到
MSFT对此给予了大力支持。
您应该查看一些网站:
这篇文章比较老了,但是对阅读很有帮助
关于之间的差异
2005 和 2005 SE 版本。 这个
one 也很不错,因为它
包括 2008 年版本。
是一个很好的学习“跳转”网站
有关 VSTO 的更多信息。
对于 Office)。这,还有它
姐妹链接页面,都好跳转
页。如果你只是
正在跟上 VSTO 的步伐,但是
稍后再讲就好了。
Office 的多个版本?。
这是较旧的,但讨论了一些
围绕建设的问题
Office 的多个版本。
有组织的,但我总是发现
视频是一种非常快速的学习方式。
大多数这些视频都使用一个版本
VSTO 的。
最后,为了把最好的留到最后,这是我刚开始时读的书,它非常有帮助:VSTO for Mere Mortals(TM):使用 Visual Studio 2005 Tools for Office 进行 Microsoft Office 开发的 VBA 开发人员指南
Yeah, it can get confusing, especially given the skip-level naming conventions, etc. Essentially, you'll need:
Studio and the .NET version you're targetting.
2005, VSTO 2005 SE, VSTO 2008, VSTO
2010). For what your asking, VSTO
2005 SE is probably your best bet.
need more, like the PIAs and the .NET version you've targetted. For VSTO 2010, you don't need the PIAs (just what you're using will be packaged with your app automatically).
A couple of tips:
to VSTO should be a smooth-ish move
if you've used .NET to much extent.
models for any given program (Excel,
PowerPoint, etc.) there may be a few
more ways of doing things that are
different/better than in the VBA
version of the object model. For
example, the Bookmark control for
Word in VSTO 2008 is not the same as
the one that is native to one
accessed via VBA.
This is the very reason that that VSTO for Visual Studio 2010 does not require you
to include the full interop (PIA) files
with your package.
Office with the same solution is not
officially supported for pre-VSTO 2010. There are ways
around this issue that some folks
have talked about, but you won't get
much support from MSFT on it.
There are some sites that you should take a look at:
This is older, but is helpful to read
regarding the differences between the
2005 and 2005 SE versions. This
one is also decent in that it
includes the 2008 version.
is a good 'jump' site for learning
more about VSTO.
for Office). This, and it's
sister link pages, are good jump
pages. Not that useful if you're just
coming up to speed with VSTO, but
good for a little bit later.
multiple versions of Office?.
This is older, but discusses some of
the issues around building for
multiple versions of Office.
organized, but I've always found that
videos are a very fast way to learn.
Most of these videos use one version
of VSTO.
Finally, to save the best for last, this is the book I read when I was just starting out and it was very helpful: VSTO for Mere Mortals(TM): A VBA Developer's Guide to Microsoft Office Development Using Visual Studio 2005 Tools for Office
SpreadsheetGear for .NET 是适用于 .NET 的 Excel 兼容电子表格组件,可与 Visual Studio Express 版本配合使用,需要 . NET 2.0 或更高版本,不需要安装 Office 或 Excel,并且允许免版税分发到无限数量的客户端和/或服务器计算机。
您可以此处查看实时示例并下载免费试用版此处。
免责声明:我拥有 SpreadsheetGear LLC
SpreadsheetGear for .NET is an Excel compatible spreadsheet component for .NET which will work with Visual Studio Express editions, requires .NET 2.0 or higher, does not require Office or Excel to be installed, and does permit royalty free distribution to an unlimited number of client and / or server computers.
You can see live samples here and download the free trial here.
Disclaimer: I own SpreadsheetGear LLC
您可以使用此 Excel .NET 组件 通过 Express Edition 创建 Excel。它不需要 VSTO、ADO 或 MS Excel 自动化。
Excel Jetcell .NET 组件允许读写 Excel 电子表格。
在这里您可以找到许多Excel VB.NET 和 C# 示例。例如,请参阅从数组创建 Excel 电子表格的 VB.NET 代码:
You can create excel with Express Edition using this Excel .NET component. It doesn't require VSTO, ADO or MS Excel automation.
Excel Jetcell .NET component allows to read write excel spreadsheet.
Here you can find many Excel VB.NET and C# examples. For example see VB.NET code to create excel spreadsheet from array: