title: php spreadsheet - getting the value instead of the formula
body: <p>I'm trying to upload a spreadsheet using phpspreadsheet.</p>
  
  <p>I simply want to copy the values of each cell I see when I open the spreadsheet in open office, into the database</p>
  
  <p>The problem is in one of the columns, the value is calculated and despite reading the phpspreadsheet documentation, I can't find out how to do this.</p>
  
  <p>The value I can see if I open the spreadsheet with Open Office would be just a float like 9.12, but in the input bar where you'd type a formula, the value is:</p>
  
  <pre><code>=VLOOKUP(A2,'file:///Folder for Tenders &amp; Information required/October19/All Group Pricing Oct 2019 working.xlsx'#$'PI''s'.$A$1:$Y$1048576,25,0)
  </code></pre>
  
  <p>If I run this code:</p>
  
  <pre><code>$reader = IOFactory::createReader('Xlsx');
  $spreadsheet = $reader-&gt;load($inputFileName2);
  
  $worksheet = $spreadsheet-&gt;getActiveSheet();
  $value = $spreadsheet-&gt;getActiveSheet()-&gt;getCell('F2')-&gt;getCalculatedValue();
  echo $value;
  </code></pre>
  
  <p>That produces the error: </p>
  
  <pre><code>Fatal error: Uncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: PI!F2 -&gt; Formula Error:
  </code></pre>
  
  <p>If I change getCalculatedValue() to getValue()</p>
  
  <p>I get:</p>
  
  <pre><code>    =VLOOKUP(A2,'[1]PI''s'!$A:$Y,25,FALSE)
  </code></pre>
  
  <p>How on earth do I just get the value that I can see when I open the spreadsheet in Open Office?</p>
  
  <p>Thanks :-)</p>