--- fudge6 2012-10-08 01:27:35.187500000 -0700 +++ fudge7 2012-10-08 01:40:55.031250000 -0700 @@ -9,7 +9,7 @@ use Win32::OLE::Variant; use Win32::OLE::NLS qw(:LOCALE :DATE); use List::MoreUtils qw(natatime); -use Excel::Writer::XLSX; +#~ use Excel::Writer::XLSX; ############################################################ @@ -69,13 +69,11 @@ my $Tot_Cols = $Sheet->UsedRange->Columns->{'Count'}; #Extract the necessary information from the rows and columns and places them in three arrays @right @legal and @prod - foreach my $row ( 1 .. $Tot_Rows ) { - if( my $firstCol = eval { - $Sheet->Cells( $row, $col )->{'Value'} - } - ){ - if ( $firstCol =~ /^\d{10}$/ ) { + if( my $firstCol = eval { $Sheet->Cells( 1, 1)->{'Value'} } + and $firstCol =~ /^\d{10}$/ + ) + { push @right, $firstCol; push @legal, $firstCol; push @prod, $firstCol; @@ -83,42 +81,42 @@ ValueTargetCols( $Sheet, [ \@right, \@legal, \@prod, ], - [ $row ], + [ 1 .. $Tot_Rows ], [ qw{ 4 5 } ], ); ValueTargetCols( $Sheet, [ \@legal, ], - [ $row ], + [ 1 .. $Tot_Rows ], [ qw{ 6 } ], ); ValueTargetCols( $Sheet, [ \@right, ], - [ $row ], + [ 1 .. $Tot_Rows ], [ qw{ 7 8 9 } ], ); ValueTargetCols( $Sheet, [ \@right, \@legal, ], - [ $row ], + [ 1 .. $Tot_Rows ], [ qw{ 10 11 } ], ); ValueTargetCols( $Sheet, [ \@prod, \@right, ], - [ $row ], + [ 1 .. $Tot_Rows ], [ qw{ 12 } ], ); ValueTargetCols( $Sheet, [ \@prod ], - [ $row ], + [ 1 .. $Tot_Rows ], [ qw{ 13 14 15 17 18 @@ -130,7 +128,6 @@ } } } - } $Book->Close; }