my $fmt = $workbook->add_format( num_format => '0' ); $worksheet->write_string( 'A2', $number[$i], $fmt );