use OLE is a compatibility layer for applications using the old toplevel OLE.pm. # New code should use Win32::OLE. Try
poj#!perl use strict; use Win32::OLE::Const "Microsoft Excel"; printf "Perl %s\n",$^V; printf "Win32::OLE Version %s\n",$Win32::OLE::VERSION; my $excel = Win32::OLE->new('Excel.Application') or die Win32::OLE->LastError(); printf "Excel %s\n",$excel->{'version'}; print "excel <$excel>\n"; $excel->{Visible} = 1; my $workbook = $excel->Workbooks->Add or die Win32::OLE->LastError(); print "workbook <$workbook>\n"; my $sheet = $workbook->Worksheets("Sheet1"); $sheet->Activate; print "sheet <$sheet>\n";
In reply to Re: Using Excel in Perl failure after OS re-install
by poj
in thread Using Excel in Perl failure after OS re-install
by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |