用 apache-poi 的值替换 ms word merge-fields 在段落和具有多列的表中。
由于 docx4j 提供了替换合并字段的功能,apache poi 是否有任何等效功能。由于我在 Docx 文件中使用了一些自定义标签,因此在 docx4j 中读取文件会忽略自定义标签(xml 格式“w:xyz”)。
输入模板
Name «name»
Table : (Need to add n- number of records to the template)
ID Name
«id» «name»
预期输出:
Name: Stack
ID Name
1 Java
2 Apache