Hi All,
I have file like:
And I want to find a certain row and start reading next rows until I reach blank. Something like that:
Of course the above is not working, It doesn't stop on the empty line after "fff,kkk".
Could you please help me with that?
Thanks in advance!
I have file like:
Code:
xxx,ccc
ccc,xxx
fff,kkk
aaa,www
www,aaa
ddd,eee
rrr,sssCode:
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim path As String = "D:\tariff.txt"
Dim line As String
Dim row As String
Dim sr As StreamReader = New StreamReader(path)
Do While sr.Peek() >= 0
line = sr.ReadLine()
If line = "xxx,ccc" Then
Do Until line = ""
sr.Peek()
row = sr.ReadLine()
MsgBox(row)
Loop
End If
Loop
sr.Close()
End SubCould you please help me with that?
Thanks in advance!