use Win32::OLE; my $acum = 0; my $file2Parse = "c:/failureFile.xls"; my @DBrow; my @DBResult; my $ref; $row = 1; $ex = Win32::OLE->GetActiveObject('Excel.Application'); $ex = Win32::OLE->new('Excel.Application') or die "Oops, cannot start Excel"; # get a new workbook $book = $ex->Workbooks->Open($file2Parse) or die "no file opened"; # write to a particular cell $sheet = $book->Worksheets(1); while ($acum!=17) { $acum = 0; for ($column=1;$column<=17;$column++) { print $sheet->Cells($row,$column)->{Value}."||"; # $DBrow[$column-1] = $sheet->Cells($row,$column)->{Value}; if ($sheet->Cells($row,$column)->{Value} eq "") { $acum++; } } if ($acum != 17) { # $DBResult[$row-1] = [@DBrow]; } $row++; } $book->Close; undef $book; undef $ex;