Dear All,
I tried to export datas into csv file.problem is if the column value exeed 185 characters line break will occur.So while importing extra space coming.
Is there any option to increase the cell character using c# application so that column value will occupy in one line.
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dtBIP.Rows)
{
string[] fields = new string[10000];
fields = row.ItemArray.Select(field => field.ToString().Trim()).ToArray();
sb.AppendLine(string.Join("^", fields));
}
StreamWriter writer = new StreamWriter(File.Open(path, FileMode.OpenOrCreate, FileAccess.Write));
writer.WriteLine(string.Format(sb.ToString(), DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss")));
writer.Close();
Regards
Sreejith A