Hi,
I am creating an excel file using php like this:
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=invoice.xls");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
echo "<table><tr><th>Test</th></tr><tr><td>...</td></tr></table>";
When I try open the file, excel gives a warning that the file type is not correct. However, the file is displayed correctly and exactly like I want it to...
Is there a way to prevent this error message showing up?