..... ..... my $retrieve_ref = $sbh->fetchall_arrayref; map {$sheet->Range('A'.$count.':B'.$count)->{'Value'} = $_; $count++;} @$retrieve_ref;