I'm on fire now 
I have searched this form and come up whith this litle script to create a excel-sheet. But what it does it actualy creates a file with the jpg in it from my header ?? very weird I think Anyone got a idea
function create_excel_file($querystring)
{
$file="test.xls";
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment;filename=".$file );
header('Pragma: no-cache');
header('Expires: 0');
$result_excel = mysql_query($querystring);
if($result_excel)
{
$columns=mysql_num_fields($result_excel);
for ($i = 0; $i < mysql_num_fields($result_excel); $i++)
{
print "\"".mysql_field_name($result_excel,$i)."\",";
}
echo "\n";
While ($myrow = mysql_fetch_array($result_excel))
{
for ($i = 0; $i < ($columns); $i++)
{
echo "\"".$myrow[$i]."\",";
}
echo "\n";
}
}
else
{
echo "No results";
}
}
I have searched this form and come up whith this litle script to create a excel-sheet. But what it does it actualy creates a file with the jpg in it from my header ?? very weird I think Anyone got a idea
function create_excel_file($querystring)
{
$file="test.xls";
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment;filename=".$file );
header('Pragma: no-cache');
header('Expires: 0');
$result_excel = mysql_query($querystring);
if($result_excel)
{
$columns=mysql_num_fields($result_excel);
for ($i = 0; $i < mysql_num_fields($result_excel); $i++)
{
print "\"".mysql_field_name($result_excel,$i)."\",";
}
echo "\n";
While ($myrow = mysql_fetch_array($result_excel))
{
for ($i = 0; $i < ($columns); $i++)
{
echo "\"".$myrow[$i]."\",";
}
echo "\n";
}
}
else
{
echo "No results";
}
}