Help for this page

Select Code to Download


  1. or download this
    my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
        or Win32::OLE->new('Excel.Application', 'Quit')
        or die "Could not start excel";
    
  2. or download this
    my $Excel = Win32::OLE->GetActiveObject('Excel.Application');
    if ( ! $Excel ) {
        Win32::OLE->new('Excel.Application', 'Quit');
        die 'Could not start Excel';
    }