Free Support Forum - aspose.com

Dete table row

By using ASPOSE.Word to open a word document, if i want to delete a row from a table, how can i do that?
This message was posted using Aspose.Live 2 Forum

Hi

Thank you for your interest in Aspose.Words. I think that you can try using the following code.

//Open document

Document doc = new Document(@"Test014\in.doc");

//Get table

Table table = doc.FirstSection.Body.Tables[0];

//Remove row

table.Rows[6].Remove();

//Save output document

doc.Save(@"Test014\out.doc");

Hope this helps.

Best regards.