my $format = $workbook->add_format(); $format->set_bg_color( 'red' ); $worksheet->write( 'A1', 'Cell A1', $format );