the files seams to be tab separated values along with carrage returns that need striped out.
I used this
(FYI tr = TextReader)
string[] Split = tr.ReadToEnd().Split(new char [] {'\t'});
I have also tried using a tabkey for the char
any ideals
note code is messy as I am testing different ideals
/*
* Created by SharpDevelop.
* User: huskeyw
* Date: 3/9/2007
* Time: 8:57 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using System.IO;
namespace file
{
class MainClass
{
public static void Main(string[] args)
{
string filenameWrite = "savdata.txt";
string filenameRead = "tldatanew.txt";
try
{
FileStream fs = new FileStream(filenameRead, FileMode.Open);
// FileStream fs2 = new FileStream(filenameWrite, FileMode.Append);
TextReader tr = new StreamReader(fs);
// TextWriter tw = new StreamWriter(fs2);
List<double> output = new List<double>();
try
{
string temp = "";
string[] Split = tr.ReadToEnd().Split(new char [] {'\t'});
for (int x = 0; x < Split.Length; x++)
{
Console.WriteLine(Split[x]);
temp += Split[x];
Console.ReadKey();
//temp = temp.Split(new char [] {'a', 'b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','%'});
//Console.WriteLine(temp);
}
}
finally
{
fs.Close();
//fs2.Close();
}
}
catch
{
Console.WriteLine("File not found");
}
Console.ReadKey();
}
}
}file is attached
Attached File(s)
-
tldatanew.txt (8.93K)
Number of downloads: 5

Sign In »
Register Now!
Help

Back to top
MultiQuote