用Ole方式打开Excel文件后,在读取excel文件中内容后,
用如下方式关闭。
ExcelID.WorkBooks.Close;
ExcelID.Quit;
//释放Variant变量
ExcelID:= Unassigned;
但Excel进程并没有关闭,请问要如何才能关闭excel进程
用如下方式关闭。
ExcelID.WorkBooks.Close;
ExcelID.Quit;
//释放Variant变量
ExcelID:= Unassigned;
但Excel进程并没有关闭,请问要如何才能关闭excel进程
ExcelID := CreateOleObject('Excel.Application');
ExcelID.Visible := False;
ExcelID.WorkBooks.Open(AFNEdt_File.Text);
ExcelID.WorkSheets[1].Activate;
ExcelApp.Quit(SaveChanges,OriginalFormat,RouteDocument);
ExcelApp:= unassigned;