my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); my $Book = $Excel->Workbooks->Open("checklist.xls"); my $Sheet = $Book->Worksheets(4); print "Sheet Name: ".$Sheet->{'Name'}."\n"; foreach my $row ($b..$l){ next unless defined $Sheet->Cells($row+1,$fcol+1)->{'Value'}; print "-".$Sheet->Cells($row+1,$fcol+1)->{'Value'}."\n"; foreach my $row2 ($row..$l){ last if !defined($Sheet->Cells($row2+1,$pcol+1)->{'Value'}); my $pattern = $Sheet->Cells($row2+1,$pcol+1)->Interior->{Pattern}; print "---".$Sheet->Cells($row2+1,$pcol+1)->{'Value'}."-".$pattern."\n"; } } $Book->Close;