Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an alternative to open-xml sdk to generate word documents

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.

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

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

Thanks, Jelle

like image 992
Jelle Avatar asked Dec 14 '25 11:12

Jelle


1 Answers

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/

-Eric

like image 186
Eric White Avatar answered Dec 17 '25 00:12

Eric White