excel 导入access
With Cnn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source =E:\自己做的小工具\游泳录分\Release20130420\Data\Bmk.mdb"
.Open
End With
sql = "delete from [Youyong]"
Cnn.Execute (sql)
sql = "INSERT INTO [Youyong] SELECT * FROM [Excel 8.0;DATABASE=" & _
ThisWorkbook.FullName & ";HDR=YES;IMEX=1].[youyong$];"
Cnn.Execute (sql)
Set Cnn = Nothing
瞬间删除所有数据,导入所有数据
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source =E:\自己做的小工具\游泳录分\Release20130420\Data\Bmk.mdb"
.Open
End With
sql = "delete from [Youyong]"
Cnn.Execute (sql)
sql = "INSERT INTO [Youyong] SELECT * FROM [Excel 8.0;DATABASE=" & _
ThisWorkbook.FullName & ";HDR=YES;IMEX=1].[youyong$];"
Cnn.Execute (sql)
Set Cnn = Nothing
瞬间删除所有数据,导入所有数据