How to load PHPExcel file for further working with it

Define file path:

$excelPath = 'path/to/file/example.xlsx';

Read a MS Excel file with PHPExcel stuff:

try { 
    $inputFileType = PHPExcel_IOFactory::identify($excelPath); 
    $objReader = PHPExcel_IOFactory::createReader($inputFileType); 
    $objPHPExcel = $objReader->load($excelPath); 
} catch(Exception $e) { 
    die('Error loading file "'.pathinfo($excelPath,PATHINFO_BASENAME).'": '.$e->getMessage()); 
}

Add headers and push it out:

header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); 
header('Content-Disposition: attachment;filename="'.$EXCELname.'"'); 
header('Cache-Control: max-age=0'); 

$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); 
$objWriter->save('php://output');