if ( $col == 42 ) { $worksheet->write_number($row, $col++, $_); } else { $worksheet->write($row, $col++, $_, $format); }