title: java Apache POI Word existing table insert row with cell style and formatting
body: <p>I'am a beginner in Apache POI and want to extend an existing table in the word template file with some rows.
  If I use that code below, the table will be extended with row bit the new row's cells created normal style.</p>
  
  <p>My goal is the cells have the same table cells style etc (font, with, height...)</p>
  
  <pre><code>    XWPFDocument doc = new XWPFDocument(openFile(fileName));
      XWPFTable tbl = doc.getTableArray(tableIndex);
      XWPFTableRow lastRow = tbl.getRows().get(tbl.getNumberOfRows() - 1);
      cellCounter = lastRow.getTableICells().size(); 
      XWPFTableRow newRow = tbl.createRow(); 
      for (int i = 0; i &lt; data.size() &amp;&amp; cellCounter &lt;= data.size(); i++) {         
      String text = data.get(i);
          XWPFTableCell cell = newRow.getCell(i);
          if (cell != null) {
              cell.setText(text);
          }
      }
  </code></pre>
  
  <p>Thanks for your answer.
  R.</p>