How to repeat table header after split table

I have a table and want to split it to 2 table
but after excute the code by follow the example , it not repeat the table header for the second table
https://docs.aspose.com/words/net/joining-and-splitting-tables/

@TanPham Header row is the same simple row in the table. The code example does not copy it. If you need to copy it, you should add the following after copying the required rows:

// Copy a heading row if required.
// You can also remove the condition if header row is not marked with HeadingFormat flag.
if (firstTable.FirstRow.RowFormat.HeadingFormat)
    table.PrependChild(firstTable.FirstRow.Clone(true));

The full code example will look like this:

// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET
// Load the document.
Document doc = new Document(@"C:\Temp\in.docx");

// Get the first table in the document.
Table firstTable = (Table)doc.GetChild(NodeType.Table, 0, true);

// We will split the table at the third row (inclusive).
Row row = firstTable.Rows[2];

// Create a new container for the split table.
Table table = (Table)firstTable.Clone(false);

// Insert the container after the original.
firstTable.ParentNode.InsertAfter(table, firstTable);

// Add a buffer paragraph to ensure the tables stay apart.
firstTable.ParentNode.InsertAfter(new Paragraph(doc), firstTable);

Row currentRow;

do
{
    currentRow = firstTable.LastRow;
    table.PrependChild(currentRow);
}
while (currentRow != row);

// Copy a heading row if required.
// You can also remove the condition if header row is not marked with HeadingFormat flag.
if (firstTable.FirstRow.RowFormat.HeadingFormat)
    table.PrependChild(firstTable.FirstRow.Clone(true));

// Save the finished document.
doc.Save(@"C:\Temp\out.docx");