Dim Conn As ADODB.Connection Set Conn = New ADODB.Connection Conn.Open "连接到你的数据库XJGL.MDB的字符串" Conn.Execute "select * into tmptable from [excel 8.0;database=" + 你的excel表名 + "].[sheet名$]" Conn.Execute "insert into xsda(学籍号,准考证号,姓名,性别,出生年月,班级)select 学籍号,班级 from tmptable" Conn.Execute "drop tabel tmptable" Set Conn = Nothing
原文链接:https://www.f2er.com/vb/262545.html