Trying to write a Open Document with non numeric formula in a cell this exception was generated:
"XMLWriter::writeAttribute() expects parameter 2 to be string, array given"
The problem was that writer was using
PHPExcel_Calculation::getInstance()->calculateCellValue($cell);
instead of
$cell->getCalculatedValue();