I currently have an excel file (.htm) that I use as a template for my invoice reports. Once a user chooses an invoice and hit submit the template is parsed with invoice information and a prompt allows the user to save the file to their computer as an excel file (.xls).
I am now in need of allowing the user to select multiple invoices. Each selected invoice will need to parse to a different sheet.
What I've done so far: I've edited the template and created sheet2 from the data copied in sheet1, but I receive an error.
Is there a way to select which worksheet I would like information to parse? Any advice on perhaps a simpler way to do this?
This prepares my output file
//Prepare the output file
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=\"$filename\"");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");