OpenXML SDK 2.0与Aspose在.NET中生成服务器端Word 2007文档 [英] OpenXML SDK 2.0 vs Aspose for server side word 2007 document generation in .NET

查看:124
本文介绍了OpenXML SDK 2.0与Aspose在.NET中生成服务器端Word 2007文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将在.Net中启动服务器端Office自动化项目.以下是计划中的关键活动:

I am going to start a Server side Office automation project in .Net. Below are the key activities that are planned:

  • 创建Word文档
  • 使用具有封面,页眉,页脚和目录的现有Word文档模板
  • 保存文件
  • 嵌入文件并调整大小:HTML,图像,Word,Excel
  • 目录生成和格式化
  • 文档格式:分页符,分节符,方向,分节符的方向,连续的页码
  • 用使用定义的内容替换嵌入式变量".

由于与Aspose相比它是免费的,所以我更倾向于OpenXML SDK 2.0.另外,就我而言,我找不到用于将Excel文档嵌入到Word文档中的示例代码,这是一个关键要求.

I am more inclined towards OpenXML SDK 2.0 since it is free compared to Aspose. Also, in aspose, I could not locate sample codes to embed Excel document inside word document which is a key requirement.

您能否指导我使用OpenXML SDK 2.0或Aspose组件?除了API的简单性之外,还有哪些因素有利于Aspose(使我也可以花一些时间来评估它)?

Can you please guide me on using OpenXML SDK 2.0 or Aspose component? What are the key factors that goes in favor of Aspose (apart from simplicity of APIs) so that i can spend time to evaluate it too?

谢谢.

推荐答案

对于最近的项目,我刚刚仔细检查了这两个选项,可以为您提供以下摘要:

I just examined both options very carefully for a recent project and can give you the following summary:

OpenXML SDK 2.0

OpenXML SDK 2.0

  • 专业人士

  • 如果要生成基于模板的Office文档,这是一个不错的选择.

  • It is a solid choice if you want to generate template-based Office documents.

除了核心SDK外,还有"Microsoft Office生产力工具",该工具带有一个名为反射代码"的功能,可以从实际生成该确切文档的现有文档中生成.NET代码. .真的很好!

Aside from the core SDK there are also the "Productivity Tools for Microsoft Office", which come with a feature called "Reflected Code" to generate the .NET code out of an existing document which actually generates this exact document. Really nice!

SDK稳定且受到Microsoft的支持.

The SDK is stable and it is supported by Microsoft.

它是免费的! Aspose.Words 的成本很高,特别是如果您您的团队中有很多开发人员,或者想在软件即服务"环境中使用它.

It's for free! Aspose.Words costs a pretty penny, especially if you have a large number of developers on your team or would like to use it in a "Software as a Service" environment.

缺点

  • OpenXML 无法呈现办公功能.简而言之,这意味着在用户刷新文档之前,不会呈现TOC的页码或Word文档的实际页码. Excel计算也是如此,因此您不能在服务器端进行渲染/计算(这里再次使用WordAutomation).

    因此,如果您需要此功能,我强烈建议您使用与Aspose.Words.
    请参见 SO问题/答案以获取更多详细信息.

  • OpenXML cannot render office functions. In short this means that the page numbers of a TOC or the actual page numbers of your Word document are not rendered until the user refreshes the document. The same is true for Excel calculations, so you can't do this rendering/calculation on the server-side (WordAutomation here we are again).

    So if you need this feature I would highly recommend you to go with Aspose.Words.
    See this SO question/answer for more details.

SDK的学习曲线似乎比Aspose.Words高一点.

The learning curve for the SDK seems to be a little bit higher than for Aspose.Words.

您还可以查看 Word自动化服务在SharePoint 2010中.

You also might have a look into the Word Automation Services in Sharepoint 2010.

希望有帮助!

这篇关于OpenXML SDK 2.0与Aspose在.NET中生成服务器端Word 2007文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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