The last 3 columns are cut off

edited November 2017 in General

I do not know why in the last csv line the last 4 columns are cut off.

builder.AppendLine( "_Dum" + "," + "_Vo" + "," + "_Bi" + "," + "_Da" + "\r");

//Add Data

foreach (var data in varModule.List)
{
builder.AppendLine( data._Dum + ",");

if (data._Stu == "B" || data._Stu == "E")
{
builder.AppendLine(data._Vo + "," + data._Bi + "," + data._Dau);
};

//Line Break

 builder.AppendLine("\r\n\n");
  }
  using (StreamWriter sw = new StreamWriter(csvFilePath))

{
  sw.WriteLine(builder);
  sw.Flush();
}

Note: If I dont wirte \r\n\n and double || the last csv row would be cut of earlier.

Sign In or Register to comment.