我用D6+win2000+excel200;
在程序中ole excel:
procedure TForm1.BitBtn1Click(Sender: TObject);
var
begin
MsExceL:=CreateOleObject('Excel.Application');
For i:=0 to (ListView1.Items.Count -1) do
begin
If ExtractFileExt(ListView1.Items[i].Caption)='.xls' then
begin
MsExceL.WorkBooks.open(ListView1.Items.Item[i].Caption);
MsExceL.Visible:=false;
MsExceL.WorkSheets[1].Activate;
end;
end;
.
.
.
end;procedure TForm1.BitBtn2Click(Sender: TObject);
begin
if BitBtn2.Caption='关闭' then
begin
close;
end;
if BitBtn2.Caption='完成' then
begin
MSExceL.Quit;
MSExceL:=unassigned;
//MSExceL:=NULL;
BitBtn2.Caption:='关闭';
end;
end;问题是excel以释放,但在系统进程中还有excel.exe,cpu=00;
怎么把Excel从系统进程中去掉?
在程序中ole excel:
procedure TForm1.BitBtn1Click(Sender: TObject);
var
begin
MsExceL:=CreateOleObject('Excel.Application');
For i:=0 to (ListView1.Items.Count -1) do
begin
If ExtractFileExt(ListView1.Items[i].Caption)='.xls' then
begin
MsExceL.WorkBooks.open(ListView1.Items.Item[i].Caption);
MsExceL.Visible:=false;
MsExceL.WorkSheets[1].Activate;
end;
end;
.
.
.
end;procedure TForm1.BitBtn2Click(Sender: TObject);
begin
if BitBtn2.Caption='关闭' then
begin
close;
end;
if BitBtn2.Caption='完成' then
begin
MSExceL.Quit;
MSExceL:=unassigned;
//MSExceL:=NULL;
BitBtn2.Caption:='关闭';
end;
end;问题是excel以释放,但在系统进程中还有excel.exe,cpu=00;
怎么把Excel从系统进程中去掉?
解决方案 »
- 散分。。。。大家觉得做一款什么软件能让你更方便快捷的使用电脑
- 谁有fastreport3的教程或者2.4的安装文件
- 主窗体调用dll窗体,dll窗体上button的CM_MOUSEENTER,CM_MOUSELEAVE消息收不到,怎么回事?
- 窗口相关问题
- 对vcl库底层机制一些不明白的地方1
- 在DBGrid网络中,调用DataSouce.DataSet.Delete后,出现“键列信息不足或不正确,更新影响到过多的行”错,高手求救啊~~
- 关于异常的问题
- 请帮个忙!!
- 怎样动态创建数据库?
- 如何对DELPHI的VCL进行重编译
- 大哥们兄弟有难快来打救啊!!
- 如何用SQL语句动态改变dbf表某字段长度(不删除原有数据)?
ExcelApp.Quit;
ExcelApp := Unassigned;
不过还得看你的EXCEL的设定是否为关闭前提醒
要是不提醒的话,就直接关了。。
ExcelApplication1.Quit;
ExcelApplication1.Disconnect;
不好意思记不太清了。
如果对记着给分。
if not varisempty(ExcelApp) then
ExcelApp.Quit;
ExcelApp := Unassigned;也不行呀!
进程我一无所知