Hi all,
i am trying to run the following code
i am getting the following error
Win32::OLE object version 0.1701 does not match $Win32::OLE::VE RSION 0.1703 at C
:/Perl/lib/DynaLoader.pm line 185.
Compilation failed in require at C:\OLE\ole.pl line 2.
BEGIN failed--compilation aborted at C:\OLE\ole.pl line 2.
can anybody tell me what this error means?
Thnaks in advance.
i am trying to run the following code
Code:
use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # die on errors... my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); # get already active Excel # application or open new my $Book = $Excel->Workbooks->Open("C:\\DOCUMENTS\\test.xls"); # open Excel file my $Sheet = $Book->Worksheets(1); # select worksheet number 1 $last_row = $sheet -> UsedRange -> Find({What => "*", SearchDirection => xlPrevious, SearchOrder => xlByRows}) -> {Row}; my $array = $Sheet->Range("A4:B$last_row")->{'Value'}; # get the contents $Book->Close;
Win32::OLE object version 0.1701 does not match $Win32::OLE::VE RSION 0.1703 at C
:/Perl/lib/DynaLoader.pm line 185.
Compilation failed in require at C:\OLE\ole.pl line 2.
BEGIN failed--compilation aborted at C:\OLE\ole.pl line 2.
can anybody tell me what this error means?
Thnaks in advance.
Comment