yike has asked for the wisdom of the Perl Monks concerning the following question:
is not enough to 'really' close the excel.exe program. This excel.exe is only gone from the taskmanager when the perlscript itself is left. This is especially annoying when it is a perl Tk program, eg. a GUI, where after the interaction with excel, the GUI is not closed If someone has a solution to remove/kill the app in a good way, it would be most appreciated.$excel->ActiveWorkbook->Close(0); $excel->Quit();
$excel = Win32::OLE->GetActiveObject('Excel.Application'); if ($@) { PrintError("Excel not Installed.\n"); return 0; } unless (defined $excel) { $excel = Win32::OLE->new('Excel.Application', 'Quit' ) || (sub { die "Cannot start Excel.\n";return 0 }); } $sheet = $book->Worksheets("Sheet1"); $sheet->Activate(); # some actions... $book->SaveAs($excelfile); $excel->ActiveWorkbook->Close(0); $excel->Quit();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Really stop WIN32 OLE application
by jmcnamara (Monsignor) on Apr 04, 2004 at 22:20 UTC | |
|
Re: Really stop WIN32 OLE application
by tachyon (Chancellor) on Apr 05, 2004 at 01:47 UTC | |
by Grygonos (Chaplain) on Apr 05, 2004 at 14:56 UTC | |
by tachyon (Chancellor) on Apr 05, 2004 at 16:39 UTC | |
|
Re: Really stop WIN32 OLE application
by Crian (Curate) on Apr 05, 2004 at 10:59 UTC | |
by Anonymous Monk on Apr 05, 2004 at 14:56 UTC |