I use the datatable to extract the sheetname, as in my application, users were uploading all sorts of sheets and I didn't know the sheetname. You probably can skip that step and start with the "dim cmd"
Dim FileName As String = Application("WebRoot") & "\uploads\1.xlsx"
Dim cn As OleDbConnection = New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & FileName & "';Extended Properties=""Excel 8.0;HDR=NO;IMEX=1"";")
cn.Open()
Dim dt As DataTable = cn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})
cn.Close()
cn = Nothing
Dim Source As String = dt.Rows(0)!TABLE_NAME.ToString().Replace("'", "")
dt.Dispose()
dt = Nothing
'all the above just to get the sheetname (source)
Dim cmd As New OleDbCommand
cmd.Connection = New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & FileName & "';Extended Properties=""Excel 8.0;HDR=No"";")
cmd.CommandText = "select * from [" & Source & "]"
cmd.Connection.Open()
Dim sb As New StringBuilder
Dim rd As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
rd.Read 'skip the header row
Do While rd.Read
'0 is columnA, 1 is columnB, and so on
'so below will append the text in columnB to the stringbuilder
sb.Append(rd(1).toString & VbCrLf)
Loop
'Not sure what you want to do with the string?