When I run the following code I get this error: Can't call method "Worksheets" on an undefined value. I added the die statement for the $book declaration and it does die. Which makes me believe that it cannot find $excelfile. So I tried coding the full path and I get the same result. armonth.xls is in the same folder as the script. What is really bizarre is the script worked Friday when I left. <shrug>.
The file still exists and the spelling is correct. Any ideas? Code ----- my $excelfile = 'armonth.xls'; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; use Win32::OLE::Variant; use Win32::OLE::NLS qw(:LOCALE :DATE); $win32::OLE::Warn=3; my $excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Appliciation','Quit'); $excel->{DisplayAlerts}=0; $book=$excel->workbooks->open($excelfile) or die "dead\n"; my $sheet; $sheet=$book->worksheets('AgeRaw') if ($_[0] eq "Age"); $sheet=$book->worksheets('ReceiptsRaw') if ($_[0] eq "Cash"); Paul Kraus Network Administrator PEL Supply Company 216.267.5775 Voice 216-267-6176 Fax www.pelsupply.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]