是否可以使用 ASP.NET 实现 Visio 自动化?
我的客户正在尝试恢复生成数据驱动的 Visio 甘特图的 ASP.NET 1.0 应用程序(是的,您没看错)。我可以访问代码 (VB.NET),但没有注释、注释或文档,也没有 2003 年的员工。使问题更加复杂的是,我对这个场景还很陌生(仅限 ASP.NET 3.5+),因此项目结构对我来说看起来非常陌生(.resx 文件?)。
我尝试过包含 Visio Interop 库,但收效甚微。我尝试按照 这篇文章 进行操作,但是在添加 MS Visio 12.0 类型库引用时对于 VWD Express 2010 中的项目解决方案,我收到一条错误,内容为:“无法添加对“Microsoft Visio Viewer 12.0 类型库”的引用。将类型库转换为 .NET程序集失败。没有进程与此对象关联。” 我不知道这意味着什么,但我感觉这将是一个非常令人头疼的问题。
此时我陷入困境并考虑将此功能移植到更多当前平台。有人可以建议什么吗?
My clients are trying to revive an ASP.NET 1.0 application (yes, you read that right) that generated data-driven Visio Gantt diagrams. I have access to the code (VB.NET), but there are no notes, comments, or documentation, and no employees from 2003 still around. Compounding the issue, I'm pretty new on the scene (ASP.NET 3.5+ only), so the project structure looks very foreign to me (.resx files?).
I've tried including Visio Interop libs with little success. I tried following this article , but when adding the MS Visio 12.0 type library reference to the project solution in VWD Express 2010, I get an error that reads, "A reference to "Microsoft Visio Viewer 12.0 Type Library" could not be added. Converting the type library to a .NET assembly failed. No process is associated with this object." I don't know what that means but I sense it'll be a huge headache to resolve.
At this point I'm stuck and considering porting this feature to more a current platform. Can anybody suggest anything?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Visio 具有 xml 格式 (.vdx)
如果不需要 Visio 帮助您进行布局或连接,您可以生成 xml 文件,然后让 ASP 应用程序将它们作为可使用的 Visio 文件提供。
如果您需要 Visio 的甘特图加载项功能,或者 Visio 的导出到 Web 或图像功能,那么这可能不是正确的选择。但是,如果您只需要在页面上放置形状,设置文本和其他数据字段,并且有相当简单的布局和简单的连接线,那么您应该能够走这条路。
本文中的最后一个下载链接是我不久前提供的有关 Visio 和 XML 的演示文稿:
http://www.visguy.com/2006/11/30/visio-and-xml-conference-resources/
Visio has an xml format (.vdx)
If you don't need Visio to help you with layout or connections, you might be able generate the xml files, then have your ASP app serve them up as consumable Visio files.
If you need Visio's Gantt-chart add-in features, or Visio's export to web or image features, then this might not be the way to go. But if you only need to place shapes on a page, set text and other data fields, and have a fairly simple layout and simple connecting lines, you should be able to go this route.
The last download link in this article is for a presentation on Visio and XML that I gave a while back:
http://www.visguy.com/2006/11/30/visio-and-xml-conference-resources/
您不应从 ASP.NET 或任何其他服务器环境访问任何 Office 程序的自动化 API。它不受支持,会随机失败,并可能导致您违反 Microsoft 的许可条款。
告诉他们“不”。你会更快乐。
You should not access the automation API of any Office program from ASP.NET or any other server environment. It is unsupported, will fail at random, and may cause you to violate the terms of your license with Microsoft.
Tell them "no". You'll be much happier.
那么,您可以下载并使用 Aspose.Diagram 库。它可以处理 Microsoft Visio 文件,无需安装 Microsoft Office Visio。开发人员可以创建、打开和操作图表元素,并导出为许多其他支持的文件格式。根据您的情况,您可以从数据库后端获取详细信息,然后创建 Visio 图表。它可以使用 Aspose.Diagram API 来实现。请参阅Aspose.Diagram for .NET API 的技术资源。
我在 Aspose 担任开发人员传播者。
Well, you may download and use Aspose.Diagram library. It works with Microsoft Visio files without the installation of Microsoft Office Visio. Developers can create, open and manipulate the elements of diagrams and export to many other supported file formats. Based on your scenario, you may get details from a database backend and then create Visio diagrams. It is achievable using Aspose.Diagram API. Please refer to the technical resources of Aspose.Diagram for .NET API.
I work as a Developer Evangelist at Aspose.