Dim strConnString As String = "Provider=Microsoft.Jet.OLEDB. 4.0;Data Source=" & strFolderPath & ";Extended Properties=Text;"
Dim conn As New OleDbConnection(strConnString)
Dim conn As New OleDbConnection(strConnString)
Try
conn.Open()
conn.Open()
Dim cmd As New OleDbCommand("SELECT * FROM [" & strFileName & "]", conn)
Dim da As New OleDbDataAdapter()
Dim da As New OleDbDataAdapter()
da.SelectCommand = cmd
Dim ds As New DataSet()
da.Fill(ds)
da.Dispose()
Return ds.Tables(0)
Catch
Return Nothing
Finally
conn.Close()
End Try
End Function