I encountered a problem while developing my PERL script which reads Excel files and do some calculations. I use ActivePerl 5.14.2 Build 14R02 on Windows XP (I am not asking you to help debug ActivePerl but just to provide full info).
Is there a bug list for Win32::OLE that documents issues with Excel?
If there is a more appropriate forum to raise this question, please let me know.
Note that the code was working before (and I saved old versions of the working code).
All of a sudden the script fails on opening the Excel workbook using the call $in_Excel->Workbooks->open($workbook) & $workbook is the workbook filename . This is the error message: "Can't call method "Worksheets" on an undefined value at xls2csv.pl line 15"
I put a "print $workbook; " statement before the call and the proper filename (residing in the same directory). Running the old working code gets me the same error.
Please help.
Code extraction:
sub LoadFile { my $map_file = shift; print "$map_file\n"; my $in_Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win +32::OLE->new('Excel.Application', 'Quit'); my $in_eBook = $in_Excel->Workbooks->open($map_file) || die "Failed to + open Workbook $map_file.\n";; # dies at the last statement }
In reply to Win32::OLE Excel issue by sgp_perl_user
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |