Dim connect As String = _ "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + _ Excel + ";Extended Properties=""Excel 12.0 Xml;""" Using conn As New OleDb.OleDbConnection(connect) Using cmd As New OleDbCommand() cmd.Connection = conn 'inserting the Excel data to Access database cmd.CommandText = "INSERT INTO [MS Access;Database=" & _ Access & "].[village] SELECT * FROM [" + tableName + "$]" conn.Open() cmd.ExecuteNonQuery() End Using End Using
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)