title: How can i repeat a XWPFTable header on subsequent pages with Apache-POI api for java (MS-Word)
body: <p>How do you get the row header to repeat itself</p>
  
  <p>this is a simular question: <a href="https://stackoverflow.com/questions/34064758/with-poi-word-api-how-to-repeat-a-table-heading-on-subsequent-pages">With POI Word API, how to repeat a table heading on subsequent pages?</a></p>
  
  <p>The code that i am currently running doing is this</p>
  
  <pre><code>XWPFTable contentTable = pXWPFDocument.createTable(50, 6);
  
  List&lt;XWPFTableRow&gt; rows = contentTable.getRows();
  XWPPFTableRow firstRow = rows.get(0);
  firstRow.setRepeatHeader(true);
  List&lt;XWPFTableCell&gt; tableCells = firstRow.getTableCells();
  //Some code to fill the first row (header)
  
  //I skip the first row (the header row) and continue with the rest
  for (int i = 1; i &lt; rows.size(); i++)
  {
    XWPFTableRow row = rows.get(i);
    addDummy(row);
  }
  </code></pre>
  
  <p>As you can see i have marked the first row with a setRepeatHeader.
  But when i have a new page the table header is not repeated. 
  What did i do wrong? 
  Please help me.
  Thx in advance!</p>