Category Archives: C#

Had to swith to C#,
useful tuts and stuff

EPPlus Columns

Creating a DataTable with EPPlus didnĀ“t work for me on some files.
Column was 10 but only 8 where created.

foreach (var cell in worksheet.Cells[1,1,1, worksheet.Dimension.End.Column])

Using this workaround at least worked

 int i = 1;

 while (i<worksheet.Dimension.Columns+1)
 dt.Columns.Add("Column " + i);