title: PhpExcel new line in cell
body: <p>What I do:</p>
  
  <ol>
  <li>query data from db </li>
  <li>explode data and insert \n</li>
  <li>prepare array</li>
  <li>open tamplate</li>
  <li>insert array into tamplate</li>
  <li>try to replace \n with new line</li>
  </ol>
  
  <p>How can I found \n and insert new line? For example I have in A1 next text "One\nTwo". I read text from A1</p>
  
  <pre><code>$ltr='A1';
  $vle=$spreadsheet-&gt;getActiveSheet()-&gt;getCell($ltr);
  </code></pre>
  
  <p>After this I try to insert text in A1 again in A1 and replace \n with new line in one cell</p>
  
  <pre><code>$spreadsheet-&gt;getActiveSheet()-&gt;getCell($ltr)-&gt;setValue("${vle}");
  $spreadsheet-&gt;getActiveSheet()-&gt;getStyle($ltr)-&gt;getAlignment()-&gt;setWrapText(true);
  </code></pre>
  
  <p>But it does not work for my. </p>
  
  <p>For example:
  <a href="https://i.stack.imgur.com/fU5nX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fU5nX.png" alt="enter image description here"></a></p>
  
  <p>So, if I open tamplate with text I can't replace \n in cells. What can I do?</p>
  
  <p><strong>Upd.</strong> I try use char(10) and insert formula (for example) <code>="hello"&amp;char(10)&amp;"world"</code> But inserted only <code>="hello"&amp;char(10)</code></p>