So I have this code\[code\]$output = '<table class="sticky-enabled"> <thead><tr><th>Text0</th><th>Text1</th><th>Text2</th> </tr></thead><tbody id=""> <tr class="odd"><td>7</td><td>texttt</td><td>texttt</td> </tr></table>'; header("Content-type: application/vnd.ms-excel;"); header("Cache-Control: no-store, no-cache"); header("Content-Disposition: attachment; filename=file.xls"); print chr(255) . chr(254) . mb_convert_encoding($output, 'UTF-16LE', 'UTF-8'); exit;\[/code\]And the thing would download an excel file with the table.There are 2 problems though:[*]When I open it with excel it'll display the file you're trying to open is in different format from the extension error[*]When I try to save it, the default file extension is .htm instead of xlsIs there a way to manipulate the headers etc so that these 2 problems are resolved?