open( OUT, '>', "$output_file" ) or croak "Unable to open $output_file, $!"; print OUT "$number[2], $number[$i], $number[$i+1]\n"; #### my $fmt = $workbook->add_format( num_format => '0' ); $worksheet->write_string( 'A2', $number[$i], $fmt );