python-docx 0.8.10 documentation
table.rows
_Rows, instance containing the sequence of rows in this table.
table.rows[n]._tr.addnext(element)
Adds the element as a following sibling directly after this element.
This is normally used to set a processing instruction or comment after the root node of a document. Note that tail text is automatically discarded when adding at the root level.
table.rows[n]._tr.addprevious(element)
Adds the element as a preceding sibling directly before this element.
This is normally used to set a processing instruction or comment before the root node of a document. Note that tail text is automatically discarded when adding at the root level.
python-docx 0.8.10 documentation
table.rows
_Rows, instance containing the sequence of rows in this table.
table.rows[n]._tr.addnext(element)
Adds the element as a following sibling directly after this element.
This is normally used to set a processing instruction or comment after the root node of a document. Note that tail text is automatically discarded when adding at the root level.
table.rows[n]._tr.addprevious(element)
Adds the element as a preceding sibling directly before this element.
This is normally used to set a processing instruction or comment before the root node of a document. Note that tail text is automatically discarded when adding at the root level.
利用docx包或者其他功能模块,实现在原docx表格 table[0]中第八行插入,新插入的行则为第九行(即插入点在原第八行与第九行之间)。

关于 LearnKu
推荐文章: