Questo è l'ultimo tentativo ma miseramente fallito excel dati 0 inoltre nell'apertura mi da un errore.
E pensare che c'è stato un punto dove mi tirava dentro tutto lo schermo della pagina principale.
Mi sa che devo rinuciare.

*****questo è il richiamo dalla pagina principale a quella di trasformazione in excel

<form action= ""; method="post" class="pageHeading">
<button type="submit" name="crea_file"> Crea File </button>
<?php if (isset($_POST['crea_file'])) {require_once (DIR_WS_INCLUDES . 'php-creazione_file_excel.php');}?>
</form>

***** questa è la pagina creazione file excel semplificata al massimo

<?php
$filename="product-nopics.xls";
header ("Content-Type: application/vnd.ms-excel");
header ("Content-Disposition: inline; filename=$filename");
$conn = mysql_connect('localhost','user','password') or die ('Connessione al Database fallita!!!!!');
mysql_select_db('catalogo',$conn) or die ('Il Database selezionato non esiste !!!');
$sql="select * from " . TABLE_PRODUCTS;
?>
<html xmlns="urn:schemas-microsoft-comfficeffice" xmlns:x="urn:schemas-microsoft-comffice:excel" xmlns="http://www.w3.org/TR/REC-html40">
<head><title>Export</title></head>
<body>
<table border="1">
<tr>
<th>ID#</th>
<th>Codice</th>
<th>Descrizione</th>
</tr>
<?php
$result=mysql_query($sql) or die (mysql_error());
$test=mysql_num_rows($result); // trovate 2449 righe
while ($row=mysql_fetch_array($result)) {
$id=$row['products_id'];
$model=$row['products_model'];
?>
<tr>
<td><?php echo $id;?></td>
<td><?php echo $model;?>
\n</td>
</tr>
<?php
}
?>
</table>
</body>
</html>