Generating WordML Reports Using Templates and XPath using ASP.Net

孤街醉人 提交于 2020-01-02 10:16:29

问题


I need to know how we can Generate WordML Reports Using Templates and XPath using ASP.Net. What are its advantages.

A Simple How To Tutorial is what I require.


回答1:


I need to know how we can Generate WordML Reports Using Templates and XPath using ASP.Net. ... A Simple How To Tutorial is what I require.

Create (using Word) a document in WordML format which you'll use as a template.

Look at your WordML template: see that it's in XML format. Have Microsoft's WordML reference documentation, so that you understand what it means and how to modify it.

Define XPath expressions which identify the locations in your template which you want to modify (where "modify" probably means "insert data at run time").

At runtime use an API like http://www.google.com/search?hl=en&q=c%23+xpath

What are its advantages.

Its advantages over what alternative?

The benefit is that the output is a Word document, whose content is based on a template plus modifications made at runtime.




回答2:


I would recommend you to use Content Controls and Custom XML for the purpose of report generation. Here's a sample:

http://blogs.msdn.com/erikaehrli/archive/2006/08/11/word2007DataDocumentGenerationPart1.aspx

You might also want to have a look at Microsoft's OpenXML SDK v2.0



来源:https://stackoverflow.com/questions/409020/generating-wordml-reports-using-templates-and-xpath-using-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!