It should work. The trick is to add the wrap format to the entire cell by adding it to the end of the rich_string() arg list.
Quote docs:
As with Excel, only the font properties of the format such as font name, style, size, underline, color and effects are applied to the string fragments. Other features such as border, background and alignment must be applied to the cell.
The write_rich_string() method allows you to do this by using the last argument as a cell format (if it is a format object). The following example centers a rich string in the cell:
my $bold = $workbook->add_format( bold => 1 );
my $center = $workbook->add_format( align => 'center' );
$worksheet->write_rich_string( 'A5',
'Some ', $bold, 'bold text', ' centered', $center );
End docs.
I'll update the docs to add text wrap to that list.
Here is a working example with text wrap:
#!/usr/bin/perl
use strict;
use warnings;
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( 'rich_wrap.xlsx' );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_column( 'A:A', 30 );
$worksheet->set_row( 0, 60 );
my $bold = $workbook->add_format( bold => 1 );
my $italic = $workbook->add_format( italic => 1 );
my $wrap = $workbook->add_format( text_wrap => 1 );
$worksheet->write_rich_string( 'A1',
"This is\n",
$bold, "bold\n",
"and this is\n",
$italic, 'italic',
$wrap );
John.