下面是我从Excel导入Access的例子, D6试验通过。 我机器上没有SQLServer....
//过程, ADOConnection1连接SQLTable, ADOQuery1连接ADOConnection1
procedure TDM.ImportExcel(SQLTableName,ExcelTableName,ExcelFileName: string);
var
s: string;
begin
if ADOQuery1.Active then
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
s := 'insert into '+SQLTableName+' Select * from '+ExcelTableName+' in "'+ExcelFileName+'" "Excel 8.0;"';
ADOQuery1.SQL.Add(s);
ADOQuery1.ExecSQL;
end;
//引用
procedure TForm1.Button1Click(Sender: TObject);
begin
DM.ImportExcel('MyTable','Sheet1','c:/test.xls');
end;