use 5.20.0;
use warnings;
use Spreadsheet::Read;
my $sheet = 1;
my $column = 2;
my @column = @{ReadData ("file.xls")->[$sheet]{cell}[$column]};
while (@column and !defined $column[-1]) {
pop @column;
}
say "Column ${column}'s last defined row = ", $#column;
####
my $colref = ReadData ("file.xls")->[$sheet]{cell}[$column];
pop @$colref while $#$colref > 1 && !defined $colref->[-1];
say "Column ${column}'s last defined row = ", $#$colref;
####
say "Column ${column}'s last defined row = ",
ReadData ("file.xls")->[$sheet]{maxrow};