$cell = $worksheet->get_cell($line, $col-1); if(defined $cell) { my $format = $cell->get_format(); } $worksheet->AddCell($line, $col, $val, $format);