I need to create a .xls file and assign the correct mimetype to it. A simple header()
statement didn't work probably because i'm using PHPGtk.
MSOffice gives me an error when opening the file, it says the content may not reflect the extension of the file, so i immediately thought it could be because of the mime type.
Currently, the code is (in a very malformed html snippet):
$table = '<table><thead><tr><th>Oi</th></tr></thead><tbody><tr><td>opaopaopa</td></tr><tr><td>sjiasiaj</td></tr></tbody></table>';
$handle = fopen('C:\opa.xls','w+');
fwrite($handle, $table);
fclose($handle);