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
Not everything should be done with AJAX. Sometimes plain old HTML is more suitable for a job. I guess your button has a tag? Why won't you do something like this
Export to Excel
in your HTML? Note the target="_blank" part. It's there to make sure your page is not reloaded.
For input you can use construct