Dim fname As String = "C:\Users\Windows 7 User\Desktop\Stock.txt" Dim colsexpected As Integer = 8 Dim thereader As New StreamReader(fname, Encoding.Default) Dim sline As String Do sline = thereader.ReadLine If sline Is Nothing Then Exit Do Dim words() As String = sline.Split(",") DataGridView1.Rows.Add("") For ix As Integer = 0 To 7 DataGridView1.Rows(DataGridView1.Rows.Count - 1).Cells(ix).Value = words(ix) Next Loop thereader.Close()
words
ix
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)