tags:

views:

46

answers:

1

I need to read a xls/xlsx/ods/txt file line by line,to get a column name of file .

how to read a file line by line in vb.net?


This is surely a duplicate of one of hundreds of questions.
For example, Excel File in VB.NET

A: 
Dim file as System.IO.File
Dim reader as System.IO.StreamReader
reader = file.OpenText("C:\sample.txt")

While reader.Peek <> -1
  LineIn = reader.ReadLine()

End While

reader.Close()
gmcalab
And the reason for down voting ? The question asked was how do i read a file line by line in vb.
gmcalab