title: How to set formula "=''Sheet Name''!B10" with PHPExcel
body: <p>The idea is to set dynamic value from sheet a to sheet b, where sheet b new value changes with the change in sheet a value.</p>
  
  <p>Here I have defined all the ways that can be used to set value from sheet a to sheet b, but all this methods are not dynamically updating.</p>
  
  <pre><code>$ba = $objPHPExcel-&gt;getSheet(1)-&gt;getCell('B10')-&gt;getCalculatedValue();
  
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B12', $ba);
  </code></pre>
  
  <p>Is the code I am using which is accurate but it sets the calculated value of B10 which is equal to "=SUM(B4:B5)" which gives a value 'X' and print 'X' on excel sheet.</p>
  
  <p>If I use</p>
  
  <pre><code>$ba = $objPHPExcel-&gt;getSheet(1)-&gt;getCell('B10')-&gt;getValue();  
  </code></pre>
  
  <p>"not getCalculatedValue()"</p>
  
  <p>In this case it will create a formula <code>'=SUM(B4:B5)'</code> and generate sum of B4 TO B5 values but from the same sheet not from the sheet from where I want to fetch.</p>
  
  <p>Actual formula for that is <code>='sheet name'!B10</code> </p>
  
  <p>But when I use this as </p>
  
  <pre><code>$objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B12', '=''Fixed Cost''!B10');
  </code></pre>
  
  <p>This will generate an error.</p>