This is the code to determine Last Row and LastCol if everything is clean and simple in excel file my $sheet =$oBook->Worksheets($iSheet); my $name =$oBook->Worksheets($iSheet)->{Name}; my $LastRow = $sheet->UsedRange->Find({What=>"*",SearchDirection=>xlPrevious,SearchOrder=>xlByRows})->{Row}; my $LastCol = $sheet->UsedRange->Find({What=>"*",SearchDirection=>xlPrevious,SearchOrder=>xlByColumns})->{Column};