Everything but the column: win32::OLE Excel fun
am 08.06.2006 03:07:50 von PhilThis doesn't print out anything. I want it to print the desired
range I selected in the $array declaration.
I appreciate any insights!
Thanks,
-Phil
/////////////////////////////
use Win32::OLE;
eval {$Excel = Win32::OLE->GetActiveObject('Excel.Application')};
die "Excel not installed" if $@;
unless (defined $ex) {
$Excel = Win32::OLE->new('Excel.Application', sub
{$_[0]->Quit;})
or die "Oops, cannot start Excel";
}
$Excel = Win32::OLE->GetActiveObject('Excel.Application');
$Book = $Excel->Workbooks->Open('C:\Documents and
Settings\pvernes\Desktop\CDS CORRELATOIN
PROJECT\Ford_equity_cds_data2.xls'); # open Excel file
$Sheet = $Book->Worksheets(1); # select worksheet
number 1
$array = $Sheet->Range('AA6:AA508')->{value}; # get the contents
$Book->Close;
foreach $array (@array) {
print $array;
}