excel导入sql
哪位能给解释一下为什么报错,我的excel表名是hh,是没有错的delphi ole db 提供程序'microsoft.jet.oledb.4.0' 不包含表'hh'.该表可能不存在,或没有权限操作
procedure TForm1.SpeedButton3Click(Sender: TObject);
var a,b,d:string;
c,e:integer;
begin
adoconnection1.Connected:=true;
if opendialog1.Execute then begin
a:=opendialog1.FileName;
b:=ExtractFileName(opendialog1.FileName);
c:=Length(b);
e:=c-4;
d:=trim(copy(b,1,e));
caption:=d;
//adoconnection1.Execute('INSERT INTO kg SELECT * FROM [excel 8.0;database=' + a + '].[sheet1$]');
//adoconnection1.Execute('select * into kg from [excel 8.0;database='+a+'].[sheet1$]');
adoconnection1.Execute('SELECT * into kg FROM OpenDataSource( '
+QuotedStr('Microsoft.Jet.OLEDB.4.0')+','
+QuotedStr('Data Source='+a+';Extended Properties=excel 8.0;Persist Security Info=False')+')...'+d+'$');