Using con As New OleDb.OleDbConnection("Provider=Microsoft.JET.OLEDB.4.0;Data Source=C:\filename.xls;Extended Properties='Excel 8.0;HDR=Yes'")
con.Open()
Dim dt As New DataTable
Using dr As OleDb.OleDbDataReader = New OleDb.OleDbCommand("select * from [sheet1$]", con).ExecuteReader()
If dr.HasRows Then
dt.Load(dr)
End If
End Using
Dim tr As OleDb.OleDbTransaction = con.BeginTransaction
For i As Integer = 0 To dt.Rows.Count - 1
Dim x As Integer = New OleDb.OleDbCommand("Insert into tablename(field1,field2) values('" & dt.Rows(i)("field1") & "','" & dt.Rows(i)("field2") & "'", con, tr).ExecuteNonQuery
Next
tr.Commit()
End Using