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 ( \"Conten
If you mean like have your PHP script create an Excel file, write some stuff to it on any sheet, etc, then offer that up for the client to download, you can just use PHP's built-in COM extension. See: http://us2.php.net/manual/en/class.com.php for all sorts of examples. However, you will need Excel (or a clone like OpenOffice) installed on the server. If you don't, perhaps Mark Baker's answer above will work instead without it.