Dim myReq As System.Net.HttpWebRequest = System.Net.WebRequest.Create("http://google.com/finance/historical?q=tadawul:" & SymbolName & "&enddate=" & Microsoft.VisualBasic.DateAndTime.MonthName(EndDate.Month, True) & "+" + CStr(EndDate.Day) + "+" + CStr(EndDate.Year) + "&startdate=" & Microsoft.VisualBasic.DateAndTime.MonthName(StartDate.Month, True) & "+" & CStr(StartDate.Day) & "+" + CStr(StartDate.Year) + "&output=csv")
Dim wres As System.Net.HttpWebResponse = myReq.GetResponse
Dim sr As New IO.StreamReader(wres.GetResponseStream)
sr.BaseStream.Seek(0, SeekOrigin.Begin)
While sr.Peek() > -1
.......... some code needed here
End While
sr.Close()
I am reading from this link google finance historical price
Data I am reading are as follow:
Date Open High Low Close Volume
Oct 23, 2014 45.50 45.60 45.00 45.11 0
Oct 22, 2014 45.40 46.40 44.80 46.14 0
Oct 21, 2014 43.50 45.20 43.50 45.11 0
Oct 20, 2014 - - 43.20 43.68 0 <--------- I want to skip This line while reading
Oct 19, 2014 45.50 45.90 44.20 44.44 0
Oct 16, 2014 46.30 46.30 43.00 43.71 0
Oct 15, 2014 48.10 47.80 47.00 47.00 0
Oct 14, 2014 47.50 48.50 46.50 48.17 0
The problem is that I wanna skip lines that have dashes (-) as data. I am using vb.net . Any Help