It maybe that your spreadsheets have cells with spaces in which are overwriting earlier spreadsheets. Run this to check
#!/usr/bin/perl
use strict;
use Spreadsheet::ParseXLSX;
my $target = 'Target.xlsx';
my @file_list = glob "*xlsx";
my @target=();
for my $file (@file_list){
next if ($file eq $target);
print "Scaning $file\n";
my $parser = Spreadsheet::ParseXLSX->new();
my $excel = $parser->parse($file);
for my $sheet ( $excel->worksheets ) {
my $name = $file ."_".$sheet->get_name;
my ( $row_min, $row_max ) = $sheet->row_range();
my ( $col_min, $col_max ) = $sheet->col_range();
for my $row ( $row_min .. $row_max ) {
for my $col ( $col_min .. $col_max ) {
my $cell = $sheet->get_cell($row,$col) ;
if ( $cell ){
my $val = $cell->value;
if ($val =~ /\S/){
if ($target[$row][$col]){
print "WARN: Overwriting row: $row col: $col val: '$val'
+\n";
} else {
$target[$row][$col] = $val;
}
} else {
print "INFO: Skipped blank $name row: $row col: $col value
+: '$val'\n";
}
}
}
}
}
}
poj