in reply to Using Excel in Perl failure after OS re-install
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Excel in Perl failure after OS re-install
by merrymonk (Hermit) on Mar 03, 2019 at 14:29 UTC | |
by poj (Abbot) on Mar 03, 2019 at 14:38 UTC | |
by merrymonk (Hermit) on Mar 03, 2019 at 14:50 UTC | |
by merrymonk (Hermit) on Mar 03, 2019 at 14:56 UTC | |
by merrymonk (Hermit) on Mar 03, 2019 at 14:36 UTC |