使用Open XML在Word文档的现有表中插入行 [英] Insert Rows in Existing table in word document using Open XML
本文介绍了使用Open XML在Word文档的现有表中插入行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在word文档中使用open xml方法插入行并在行中添加内容。
例如:如果表格有2行,则首先row是标题,第二行是空白,那么,是否可以在第二行添加记录并在该表中添加更多行。
解决方案
是的,它是可能。请参阅:
如何:将表格插入文字处理文档(Open XML SDK) [ ^ ]
示例:
// 创建一行。
TableRow tr = new TableRow();
// 将表格行附加到表格。
table.Append( TR);
Is it Possible to Insert Rows and adding contents in the row using with open xml method in word document.
Eg: IF the table got 2 rows, first row is header and the second row is blank, then , is it possible to add records in second row and add more rows in that table.
解决方案
Yes, it is possible. See this:
How to: Insert a table into a word processing document (Open XML SDK)[^]
Example:
// Create a row. TableRow tr = new TableRow(); // Append the table row to the table. table.Append(tr);
这篇关于使用Open XML在Word文档的现有表中插入行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文