processing XL using Win32::OLE



Hi,
Can anybody tell how to open an already existing xL file
and then probabaly do some processing using Win32::OLE
I found quite a few examples but none of them open an
existing excel file.
Or is there some better module for XL processing ?
Here is my code ..
use strict ;
use warnings ;
use Win32::OLE;
use Win32::OLE::Const;
my $file = "Matrix.xls" ;
my $ex ;
eval {$ex = Win32::OLE->GetActiveObject('Excel.Application')};
die "Excel not installed" if $@;
unless (defined $ex) {
$ex = Win32::OLE->new($file, sub {$_[0]->Quit;})
or die "Oops, cannot start Excel";
}
# get a new workbook
my $book = $ex->Workbooks->Add;
my $Sheet = $book->Worksheets(1);
$***->{Name} = 'Candle';
$book->Close;




Thanks
Alok.



____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/