in reply to Re: A simple read of XLSX into Perl
in thread A simple read of XLSX into Perl
I tried something different :
use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32: +:OLE->new('Excel.Application', 'Quit'); my $Book = $Excel->Workbooks->Open("E:\\readexcel.xlsx"); my $Sheet = $Book->Worksheets(1); my $array = $Sheet->Range("A0:C2")->{'Value'}; $Book->Close; Foreach my $ref_array (@$array) { foreach my $scalar (@$ref_array) { print "$scalar\t;" } print "\n;" }
This time I got :
E:\>perl E:\readexcel.pl Win32::OLE(0.1709) error 0x800a03ec in METHOD/PROPERTYGET "Range" at E:\readexcel.pl line 9
Is there something wrong with my OLE…?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A simple read of XLSX into Perl
by dasgar (Priest) on Feb 27, 2013 at 04:55 UTC | |
by gadi99 (Initiate) on Feb 27, 2013 at 09:07 UTC | |
|
Re^3: A simple read of XLSX into Perl
by Anonymous Monk on Feb 27, 2013 at 02:42 UTC |