以新元素替换当前表
名称 | 类型 | 描述性 |
元素分解 | 文件元素 | 元素替换当前表 |
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvaro表=api.Criate表(3,3)oDocument.AddElement(0, oTable)!var表Style=ODocument.CreateStyleoTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"))!oTable.SetStyle(oTableStyle)!varodeptes=api.CreateleodText(表替换为当前段)oTable.ReplaceByElement(oParagraph)!builder.SaveFile("docx", "ReplaceByElement.docx")!builder.CloseFile();