Extract data from text file
<p>I need to extract some data from a text file and insert to columns in excel sheet. I know how to do this if the rows and the length of the string is known. </p>

<pre><code>try
{
    using (System.IO.StreamReader sr = new System.IO.StreamReader("test.txt")
    {
        string line;
        while ((line = sr.ReadLine()) != null)
        {
            listSNR.Items.Add(line.Substring (78,4));
        }
    }
}
</code></pre>

<p>But the particular text file is complex and the starting index or the length cannot be provided. But the starting word (PCPU01) of the row is known. 
Eg: <code>PCPU01,T2716,0.00,0.01,0.00,0.00</code></p>

<p>output:
<code>T2716  0   0.01    0   0</code></p>

<p>In that case can somebody please let me know how to extract the texts?</p>
