I would like to fill a table in a docx document by using addTemplateVariable with the 'table' paramenter.
Basically that works fine, but I have the problem, that the content for the cells contains line breaks "\n". I tried different ways, but I don't get the result to have the line breaks in the table cells in the docx. They are simply ignored, so all the text is in one line.
Example:
$data = array(
array(
'a' => "Line1\nLine2",
'b' => "Line1\nLine2\nLine3",
),
array(
'a' => "Line1\nLine2",
'b' => "Line1\nLine2\nLine3",
)
);
$docx->addTemplateVariable($data, 'table', array('header' => false));
Is there any way to get this done?
Regards, R.