# Get the last cell for the sheet (address returned as absolute) my $last_cell = $worksheet->Range("A1")->EntireColumn->SpecialCells(xlCellTypeLastCell)->{Address}; my ($max_column, $max_row) = $last_cell =~ /\$(\w+)\$(\d+)/;