title: Uncaught exception 'PHPExcel_Reader_Exception' with message could not open for reading
body: <p>I am creating a form for users that will allow them to upload <code>.csv</code> files and <code>xls/xlsx</code> files. Currently, the program does allow them to upload <code>.csv</code> files, which are used to update the <code>Oracle 11g</code> database I am working off of. However, I cannot seem to figure out how to open, then right the <code>xsl/xlsx</code> files to <code>csv</code>'s. I keep getting this error:</p>
  
  <pre><code>Fatal error: Uncaught exception 'PHPExcel_Reader_Exception' with message 'Could not open uploaded.xls for reading! File does not exist, or it is not readable.' in /opt/apache/servers/planninganddesign/htdocs/LG/SLCCA/Classes/PHPExcel/Shared/OLERead.php:80 Stack trace: #0 /opt/apache/servers/planninganddesign/htdocs/LG/SLCCA/Classes/PHPExcel/Reader/Excel5.php(1164): PHPExcel_Shared_OLERead-&gt;read('uploaded.xls') #1 &lt;DIRECTORY&gt; (612): PHPExcel_Reader_Excel5-&gt;_loadOLE('uploaded.xls') #2 /opt/apache/servers/planninganddesign/htdocs/LG/SLCCA/update_handler2.php(12): PHPExcel_Reader_Excel5-&gt;load('uploaded.xls') #3 {main} thrown in /opt/apache/servers/planninganddesign/htdocs/LG/SLCCA/Classes/PHPExcel/Shared/OLERead.php on line 80 
  </code></pre>
  
  <p>It's a very long error, but I think just the first line is my main issue at the moment.</p>
  
  <p><strong>update2.php</strong> (form) [I doubt you need this]:</p>
  
  <pre><code>&lt;?php require('reader.php'); ?&gt;
  
  &lt;form name="file" enctype="multipart/form-data" action="update_handler2.php" method="post" &gt;
  
     &lt;u&gt;GF:&lt;/u&gt; &lt;input type="file" name="uploaded"&gt;&lt;br&gt;
     &lt;u&gt;GF:&lt;/u&gt; &lt;input type="number" name="numbers"&gt;&lt;br&gt;
  
     &lt;input type="submit" value="Submit"&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>update_handler2.php</strong> (handler):</p>
  
  <pre><code>&lt;?php require_once'Classes/PHPExcel/IOFactory.php'; ?&gt;
  
  &lt;?php
  
      $file = $_FILES['uploaded']['tmp_name'];
  
      $inputFileType = 'Excel5';
      $inputFileName = '$file';
  
      $objReader = PHPExcel_IOFactory::createReader($inputFileType);
      $objPHPExcelReader = $objReader-&gt;load($inputFileName);
  
      $loadedSheetNames = $objPHPExcelReader-&gt;getSheetNames();
  
      $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcelReader, 'CSV');
  
      foreach($loadedSheetNames as $sheetIndex =&gt; $loadedSheetName) {
          $objWriter-&gt;setSheetIndex($sheetIndex);
          $objWriter-&gt;save($loadedSheetName.'.csv');
      }
  
  ?&gt;
  </code></pre>
  
  <p>Does anyone know how to fix to this issue?</p>