Clone Table


Aspose.Words.Tables.Table tableClone = (Aspose.Words.Tables.Table) table.Clone(true);
table.ParentNode.InsertAfter(tableClone, table);

the above code will create a clone table, My reqirement is like the clone table should display in the new page

Hi Ajeesh,

Thanks you for inquiry. Please follow up the code snippet to create clone table in the new page.

Document doc = new Document("c:/temp/test.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
Table table = (Table) doc.GetChild(NodeType.Table, 0, true);
Aspose.Words.Tables.Table tableClone = (Aspose.Words.Tables.Table) table.Clone(true);
Section section = new Section(doc);
// Lets set some properties for the section.
section.PageSetup.SectionStart = SectionStart.NewPage;
section.PageSetup.PaperSize = PaperSize.Letter;
// The section that we created is empty, lets populate it. The section needs at least the Body node.
Body body = new Body(doc);
builder.Document.Save("c:/temp/Out115.docx", SaveFormat.Docx);

Hope this will help. In case of any ambiguity, please let me know.


Thanks for your reply. Its working good shape

Hi Ajeesh,

Thank you very much
for your feedback. It is great to hear that your issue has been resolved. You
are always welcome and please feel free to ask if you have any query in future.
We always welcome constructive response from our customers.