title: PHPExcel - Read downloaded xlsx file
body: <p>Recently I downloaded a generated Excel file (xlsx) from the internet, and saved it to my pc. To edit this file in Excel, I first have to click on 'Protected view - Enable editing' to edit the document.</p>
  
  <p>When I upload the file to the server without opening this file in Excel first, PHPExcel isn't able to recognize the data in the Excel file. After opening the file in Excel and clicking on 'Enable editing' and re-saving the file, PHPExcel imports the file correctly.</p>
  
  <p>I checked the mimetype of the file (directly after downloading it). The mimetype is 'application/zip' (instead of 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'). After resave the document in Excel the mimetype is 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'.</p>
  
  <p>The code I use to import files using PHPExcel:</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  $file_name = 'Excelfile.xlsx';
  
  $objReader = PHPExcel_IOFactory::createReaderForFile($file_name);
  
  $objReader-&gt;setReadDataOnly(true);
  
  $objPHPExcel = $objReader-&gt;load($file_name);
  
  $worksheet = $objPHPExcel-&gt;getSheet(0);
  ?&gt;
  </code></pre>
  
  <p>Do anyone know how you could read Excel files with PHPExcel, without the need of resaving the file in Excel?</p>