title: Add table in DocX using for-loop
body: <p>I'm applications development, which has an output Microsoft word document. I use the library docx. I have a table and I need to insert the data from the List&lt;>.</p>
  
  <p>manually - work</p>
  
  <pre><code>Table t = document.AddTable(20,2);
  t.Rows[0].Cells[0].Paragraphs.First().Append(listItem[0]);
  t.Rows[1].Cells[0].Paragraphs.First().Append(listItem[1]);
  t.Rows[2].Cells[0].Paragraphs.First().Append(listItem[2]);
  </code></pre>
  
  <p>I have 20 data and I do not want there to issue manually, so I tried to use a For loop, but somehow it does not work.</p>
  
  <p>using For - doesn't work</p>
  
  <pre><code>for (int i = 0; i == 19; i++)
  {              
      t.Rows[1 + i].Cells[0].Paragraphs.First().Append(listItem[i]);
  }
  
  document.InsertTable(t);
  </code></pre>