PHPExcel. Incorrectly formed. XLS file. What's the problem?

Form a xls file using PHPExcel.

Code form the file:
<?php
require_once('PHPExcel/Classes/PHPExcel.php');
require_once('PHPExcel/Classes/PHPExcel/Writer/Excel5.php');

// Create an object of class PHPExcel
$xls = new PHPExcel();
// Set the index of the active sheet
$xls--->setActiveSheetIndex(0);
// Get the active sheet
$sheet = $xls->getActiveSheet();
// Signed sheet
$sheet->setTitle('Report');

// Print the HTTP headers
header ( "Expires: Mon, 1 Apr 1974 05:00:00 GMT" );
header ( "Last-Modified:" . gmdate("D,d M YH:i:s") . "GMT" );
header ( "Cache-Control: no-cache, must-revalidate" );
header ( "Pragma: no-cache" );
header ( "Content-type: application/vnd.ms-excel" );
header ( "Content-Disposition: attachment; filename=report.xls" );

// Print the contents of the file
$objWriter = new PHPExcel_Writer_Excel5($xls);
$objWriter->save('php://output');


The output is some kind of crap like this:
5afc1be95e35a684975229.png

When opening the file displays the following window:
5afc1bff1a330267926900.jpeg

Prompt who faced with: what's the problem?
June 5th 19 at 21:39
1 answer
June 5th 19 at 21:41
This library is no longer supported . Try it

Find more questions by tags PHPPhpSpreadsheet