How to set 2nd row as heading across pages in aspose word table?

I have 150 rows word table and I need to set 2nd row repeat across the pages. I’m using below code to set the heading format but its not working.
table.Rows[1].RowFormat.HeadingFormat = true;

If I set first two rows its working but If I set only 2nd row, its not working.

@kiranchallagali Please note that the current behavior you are observing is the expected behavior in MS Word. In Word, table headers are designed to span across multiple rows, but they always start from the first row of the table.

To test this behavior, you can follow these steps using MS Word application:

  1. Select the entire second row of the table by clicking and dragging across the row.
  2. Right-click on the selected row and choose “Table Properties” from the context menu. Alternatively, you can go to the “Layout” tab in the ribbon and click on “Table Properties” in the “Table” group.
  3. In the “Table Properties” dialog box, switch to the “Row” tab.
  4. You will notice that the option “Repeat as header row at the top of each page” is disabled and cannot be checked.

As a workaround, you can consider splitting the first row of the table into a separate table. If you find this approach feasible, please let us know, and we will be glad to assist you in achieving it.