I'm using template processo for create a word document.
setValue method work fine, but i need set 3 strings in 3 lines.
String1
String2
String3
I have tried to add "\n"
String1\nString2\nString3
but this work fine ONLY with libreoffice, with microsoft office doesn't work fine.
I have tried to add '< w : b r / >' (without space) but dosen't work on libreoffice
Any suggestions?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I just tried with "< w : b r / >\n" (without space) and it seems to work both in MS Office and LibreOffice.
@antho2930 Your solution is working for me but new lines are prefixed with an intial whitespace.
@antho2930 @SalvatorePollaci You need to replace \n with </w:t><w:br/><w:t> the replacement string is without the \n. See https://github.com/PHPOffice/PHPWord/issues/268
@antho2930 @SalvatorePollaci You need to replace
\nwith</w:t><w:br/><w:t>the replacement string is without the\n. See #268
How i can add <hr> horizontal line like <br> (</w:t><w:br/><w:t>)?
Most helpful comment
@antho2930 @SalvatorePollaci You need to replace
\nwith</w:t><w:br/><w:t>the replacement string is without the\n. See https://github.com/PHPOffice/PHPWord/issues/268