Thank You, great example! From the hints here I wrote this short solution (using the non-simple ParseExcel) :
# fill in merged cells
my $ma = $page->{sheet}->{MergedArea};
for my $a ( @$ma ) {
my ( $tr, $lc, $br, $rc ) = @$a;
# propogate values top left to bottom right
my $p = $page->{sheet}->{Cells}->[$tr]->[$lc]->{Val};
for ( my $row=$tr; $row<=$br; $row++ ) {
for ( my $col=$lc; $col<=$rc; $col++ ) {
$page->{sheet}->{Cells}->[$row]->[$col]->{Val}=$p;
}
}
} # for $a
Seems to do the trick!
I've seen some cases where the cell hash also has another Val which is something like _Val. I was never sure why those were there but I've seen examples where it contains the actual val. So in that case, $p may have to be assigned differently...
Thanks all. I was floundering until you pointed out all the "merged" stuff. Seems like an odd term- I would have thought they'd use "span" not "merge"..