Hi,
Get the data from the text file into StearmWriter, then replace the space with comma sumthing like this:
private static void TextFile(string filename)
{
FileStream fsOut = File.Create(filename+"_out");
FileStream fsIn = File.OpenRead(filename);
StreamReader sr = new StreamReader(fsIn);
StreamWriter sw = new StreamWriter(fsOut);
while (!sr.EndOfStream)
{
string inputLine = sr.ReadLine();
string terminator = (sr.EndOfStream ? "" : ",");
sw.Write(inputLine + terminator);
}
sw.Flush();
fsOut.Close();
}
Mark as Answer if satisfied.
Regards,
Shree M.
Kavya Shree Mandapalli
sailulakshmid-21627, if this helps please login to Mark As Answer. | Alert Moderator