Ok figured it out. I was trying to do it like this:
$format_caption =& $workbook->addFormat(array('size' => 11, 'fontFamily' => 'Calibri', 'numformat' => '@', 'bold' => 1, 'left' => 1, 'top' => 1, 'bottom' => 1, 'right' => 1, 'vAlign' => 'vcenter', 'align' => 'center', 'fgcolor' => 50, 'textWrap' => 1));
But setting 'textWrap' => 1
didn't work.
So I changed it a bit:
$format_caption =& $workbook->addFormat(array('size' => 11, 'fontFamily' => 'Calibri', 'numformat' => '@', 'bold' => 1, 'left' => 1, 'top' => 1, 'bottom' => 1, 'right' => 1, 'vAlign' => 'vcenter', 'align' => 'center', 'fgcolor' => 50));
$format_caption -> setTextWrap();
And that solved my issue.