我把EXCEL导入到ACESS中时,会自动打开office2000,还有瑞星的查毒.烦..
还有发觉好慢,,如果我在后台运行,office2000没有显示出来,瑞星还是有的,速度同样慢.
请问有没有什么办法不用打开这些啊,,我代码如下;
procedure TForm1.EX1Click(Sender: TObject);
var filename:string;
begin
fileName:='';
opendialog1.FileName:='';
opendialog1.Execute;
if opendialog1.FileName='' then Exit;
filename:=opendialog1.FileName;
Excelapp.Workbooks.Open (filename,
EmptyParam,EmptyParam,EmptyParam,EmptyParam,
EmptyParam,EmptyParam,EmptyParam,EmptyParam,
EmptyParam,EmptyParam,EmptyParam,EmptyParam,1);
adoConnection1.Execute('delete from table1');
adoConnection1.Execute('INSERT INTO table1(姓名,考勤号码,日期, 对应时段,上班时间,下班时间,签到时间,签退时间)' + 'SELECT 姓名,考勤号码,日期,对应时段, 上班时间,下班时间,签到时间,签退时间' +
' FROM [excel 8.0;database=' + fileName + '].['+GetName(FileName)+'$]');
Excelapp.Workbooks.Close(1);
ExcelApp.Quit;
with adoQuery1 do
begin
close();
sql.clear;
sql.Text:='select 姓名,考勤号码, 对应时段,上班时间,下班时间,签到时间,签退时间,每天工作时间 from table1';
open;
end;
end;