Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在研究基于模板以编程方式编辑 Word 文档的领域。例如,如果模板中有一个我的地址部分,他们希望我过去的地址可以追溯到 5 年前,而我已经搬了 3 次,我将不得不输入 3 个地址。显然这里的字段完全相同,但我希望它们每个都有不同的值。处理这个问题的最佳方法是什么?我想在后端 XML 文档中我希望看到 Address1 Address2 Address3 等等,但并不是每个人都会有 3 个地址。我是否应该在模板中只有一个位置,并让我的代码为地址注入其他 XML 部分,基于模板进行硬编码?
请参阅http://dbe.codeplex.com/Thread/View.aspx?ThreadId=219510 或http://dev.plutext.org/svn/docx4j/trunk/docx4j/sample-docs/databinding/conventions.docx