是否有替代open-xml sdk生成Word文档的方法 [英] Is there an alternative to open-xml sdk to generate word documents

查看:141
本文介绍了是否有替代open-xml sdk生成Word文档的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用开放xml sdk生成word文档.当文档很小时,这是没有问题的(而且相当容易).当文档变大(+500页)时,我注意到性能(持续时间,内存使用量,...)大大降低了.

I'm trying to generate word documents using open xml sdk. When the documents are small this is no problem (and rather easy). When the documents become larger (+500 pages) I notice the peformance (duration, memory usage, ...) goes down significantly.

谷歌搜索此问题,我遇到了 spreadsheetgear 的解决方案.

Googling this problem I came across some posts that point out the same problem. For excel there is a solution with spreadsheetgear.

我想知道是否有替代词,或者是否有其他解决方案来生成Word文档?

I would like to know if there is a word alternative to this or if there are other solutions to generate word documents?

谢谢, 耶莱

推荐答案

我写了一篇有关生成Open XML WordprocessingML文档的博客文章.我采用的方法是创建一个Word文档模板,插入内容控件,然后在这些内容控件中编写XPath表达式,以指定要从源XML数据文件中提取的XML.我还探讨了另一种方法,您可以在Open XML内容控件中编写C#代码.这种方法也行得通.

I've written a blog post series on generating Open XML WordprocessingML documents. The approach that I take is that you create a template Word document, insert content controls, and then write XPath expressions in those content controls to specify the XML to pull from a source XML data file. I've also explored another approach where you write C# code in Open XML content controls. That approach also works.

http://ericwhite.com /blog/map/generating-open-xml-wordprocessingml-documents-blog-post-series/

-埃里克

这篇关于是否有替代open-xml sdk生成Word文档的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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