1
Vote

rows[i+1] not correctly work

description

  var z = lst[i].Split('\"');
  t.Rows[i].Cells[0].Paragraphs.First().Append(z[0]);
  t.Rows[i+1].Cells[1].Paragraphs.First().Append(z[2]); // this cod not add data in next rows. cell

comments

BoucherS wrote Apr 27 at 6:19 PM

This looks to work correctly.

Tested with:
 var t = _document.Tables[ 0 ];

      var data = "first\"second\"third";
      var z = data.Split( '\"' );
      t.Rows[ 0 ].Cells[ 0 ].Paragraphs.First().Append( z[ 0 ] );
      t.Rows[ 1 ].Cells[ 1 ].Paragraphs.First().Append( z[ 2 ] );