in reply to Reading Excel
Try adding error-checking:
"use strict;" would help too, in the long run.$Win32::OLE::Warn = 3; # Die on Errors. my $excelfile = 'C:/perlpractice/FU_HMI_List.xlsm'; my $Excel = Win32::OLE->GetActiveObject('Excel.Application') or Win32::OLE->new('Excel.Application', 'Quit') or die Win32::OLE->LastError(); my $Book = $Excel->Workbooks->Open($excelfile) or die Win32::OLE->Last +Error(); my $Sheet = $Book->Worksheets(3) or die Win32::OLE->LastError();
...it is unhealthy to remain near things that are in the process of blowing up. man page for WARP, by Larry Wall
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading Excel
by ravi179 (Novice) on Jan 27, 2017 at 06:28 UTC | |
by Corion (Patriarch) on Jan 27, 2017 at 07:03 UTC | |
by ravi179 (Novice) on Jan 27, 2017 at 07:12 UTC |