Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Sun Sep 17, 2017 12:04 am

Hello dears,

I have an MS Word document that contains a table, and I want to duplicate the last row in that table using Spire.Doc.
So if I started with a table of one row that contains some values, the result should contain two rows where the second row has the same values and same formatting as the first row.

Any idea how to achieve this?

ahmadakra
 
Posts: 1
Joined: Sat Sep 16, 2017 11:53 pm

Mon Sep 18, 2017 2:45 am

Dear ahmadakra,

Thanks for your inquiry.
Please refer to the code below.
Code: Select all
            table.Rows.Add(table.LastRow.Clone());

If there is still issue, please offer us your input document for further investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Sep 20, 2017 8:13 am

Dear ahmadakra,

Did you try the code I provided ? Did it help you solve your issue ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc