I am using PHPExcel to read an excel template, populate the data, and ask the user to download the file.
generate_excel.php
$objPHPExcel = PHPExcel_I
I don't think you can download anything by ajax call. Instead of you can generate and save the excel in server (temporary) and show the download link to the user.