您可以.CloneNode(true)在 OpenXmlElement 上使用深度克隆
因此,如果您想在表中复制一行,它将看起来像
// suppose table an OpenXml Table and row the row you want to clone
table.Append(row.CloneNode(true));
Run Code Online (Sandbox Code Playgroud)
编辑:将其插入到特定行之前
// suppose r is the row you want to insert it before
r.InsertBeforeSelf(row.CloneNode(true));
Run Code Online (Sandbox Code Playgroud)