title: PhpSpreadsheet is corrupting files
body: <p>I am using PhpSpreadsheet to modify an existing file and send it to the browser, but every time I download the file excel gives me the following error:</p>
  
  <blockquote>
    <p>We found a problem with some content in filename.xlsx. Do you want us to try and recover as much as we can? If you trust the source of this workbook, click Yes.</p>
  </blockquote>
  
  <p>I have stripped back everything to the following code. The template file that I am opening is a brand new excel file, with no edits made to it (to avoid the potential that the error already exists in the template). I can open this file from the drive without any issues.</p>
  
  <pre><code>$spreadsheet = IOFactory::load(storage_path() ."\Template - English.xlsx");
  
  // Redirect output to a client’s web browser (Xlsx)
  header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  header('Content-Disposition: attachment;filename="filename.xlsx"');
  header('Cache-Control: max-age=0');
  
  // If you're serving to IE 9, then the following may be needed
  header('Cache-Control: max-age=1');
  
  // If you're serving to IE over SSL, then the following may be needed
  header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
  header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
  header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
  header('Pragma: public'); // HTTP/1.0
  
  $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
  $writer-&gt;save('php://output');
  </code></pre>
  
  <p>Once I go through the repair process I get the following message from Excel, and everything seems to work fine.</p>
  
  <blockquote>
    <p>Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.</p>
  </blockquote>
  
  <p>**EDIT: **
  The same error occurs when I generate a new file using <code>$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();</code></p>