I want to generate an MS Excel file from PHP. I know one can do something like this:
header ( "Content-type: application/vnd.ms-excel" );
header ( "Content-Disposition: attachment; filename=foo_bar.xls" );
But it will generate a file with just one Sheet. What I want is generating a file with multiple sheets. How can I do that? Maybe there’s a third party library, but I haven’t found too much.
Try looking at PHPExcel. This is a simple example that creates an Excel file with two sheets: